制作灰尘

1.制作了马蹄底部行走时会产生的灰尘
2.制作了可破坏的障碍破碎市的灰尘,直接做成爆炸状了

建议:
在马撞碎障碍物时建议加入短暂卡顿,类似于动作游戏卡肉增加力量感。
This commit is contained in:
GrassTE 2022-08-22 03:05:00 +08:00
parent 159cfd8881
commit 5e1076735a
12 changed files with 9944 additions and 32 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a27060eda4ecba04b8206c84b1cc55cf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,71 @@
Shader "my/Additive Color" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture", 2D) = "white" {}
_PixelSize("Pixel Size", Range(1,256)) = 64 //转化后的像素大小
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
Blend SrcAlpha One
ColorMask RGB
Cull Off Lighting Off ZWrite Off
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_particles
#pragma multi_compile_fog
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _TintColor;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_OUTPUT_STEREO
};
float4 _MainTex_ST;
float _PixelSize;
v2f vert (appdata_t v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
fixed4 frag (v2f i) : SV_Target
{
float ratioX = (int)(i.texcoord.x * _PixelSize) / _PixelSize;
float ratioY = (int)(i.texcoord.y * _PixelSize) / _PixelSize;
fixed4 col = 2.0f * i.color * _TintColor * tex2D(_MainTex, float2(ratioX, ratioY));
col.a = saturate(col.a); // alpha should not have double-brightness applied to it, but we can't fix that legacy behavior without breaking everyone's effects, so instead clamp the output to get sensible HDR behavior (case 967476)
return col;
}
ENDCG
}
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 29fc7f1c9b430d14cab1f63613d026c7
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,98 @@
fileFormatVersion: 2
guid: 3b6c4fa01f9ec334696d43647d33b981
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,44 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: huichen
m_Shader: {fileID: -6465566751694194690, guid: 39a82e87889eab841b3c04366be2875c, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 3b6c4fa01f9ec334696d43647d33b981, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- Vector1_1124929359104cdab19d273f42e1cb7e: 0.29
- Vector1_2d89981c066d4b71a45102c5060147ff: 0.41
m_Colors: []
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 84fe29be285cded4dbcf274fed5ddd34
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,32 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: my_Additive Color
m_Shader: {fileID: 4800000, guid: 29fc7f1c9b430d14cab1f63613d026c7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 3b6c4fa01f9ec334696d43647d33b981, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _PixelSize: 13
m_Colors:
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c5125f1105b610e42bff78eac682e473
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b1f7c78e59c8f8b4a9c610c170cb19a6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 545
controlID: 79
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
@ -68,8 +68,8 @@ MonoBehaviour:
y: 0
width: 423.5
height: 839
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
@ -177,7 +177,7 @@ MonoBehaviour:
height: 30
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName: Default
m_LastLoadedLayoutName:
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@ -223,7 +223,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 555
controlID: 86
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
@ -248,7 +248,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 556
controlID: 87
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1111,22 +1111,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Scenes
- "Assets/\u9704/Shader/\u7834\u788E\u7070\u5C18"
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Scenes
- "Assets/\u9704/Shader/\u7834\u788E\u7070\u5C18"
m_LastFoldersGridSize: -1
m_LastProjectPath: C:\Users\saipo\hoo
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 79}
m_SelectedIDs: 40be0000
m_LastClickedID: 48704
m_ExpandedIDs: 00000000f6bc000042be000044be000046be000076ff00000416010000ca9a3bffffff7f
scrollPos: {x: 0, y: 179}
m_SelectedIDs: 92820000
m_LastClickedID: 33426
m_ExpandedIDs: 00000000347a0000487a00004c7a0000c27a0000b67f000000ca9a3bffffff7f
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1154,7 +1154,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000f6bc000000ca9a3bffffff7f
m_ExpandedIDs: 00000000347a0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1284,21 +1284,21 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 8e6bffff549effff04a0ffff36a4ffff10a5ffffdea5ffff56a7ffff30a8ffff58a9ffff1eabfffff8abffff98acffff3cb7ffff58b8ffff66beffffa6bfffff88c0ffff4ac1ffffd8c6ffff42fbffffeac700006ec800000814010038150100
m_ExpandedIDs: 08fbffffb0760000ba760000e276000088770000e0770000fc77000010780000347800003c7800004e78000072780000767800008c780000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: "\u963B\u6321\u7269"
m_OriginalName: "\u963B\u6321\u7269"
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: -54636
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 4}
m_SearchString:
@ -1539,9 +1539,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffset: {x: -231, y: -197}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
snapCorner: 3
id: Scene View/Particles
index: 10
layout: 4
@ -1555,9 +1555,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -15.924616, y: 9.393219, z: -0.20880719}
m_Target: {x: 38.3813, y: 8.597877, z: 0.25956884}
speed: 2
m_Value: {x: -15.999384, y: 8.686899, z: -0.19448988}
m_Value: {x: 39.47537, y: 8.667158, z: 0.2335883}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -1608,9 +1608,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 33.247982
m_Target: 16.64676
speed: 2
m_Value: 31.816252
m_Value: 19.24481
m_Ortho:
m_Target: 1
speed: 2
@ -1686,8 +1686,8 @@ MonoBehaviour:
vZoomLockedByDefault: 0
m_HBaseRangeMin: -256.875
m_HBaseRangeMax: 256.875
m_VBaseRangeMin: -113.75
m_VBaseRangeMax: 113.75
m_VBaseRangeMin: -119
m_VBaseRangeMax: 119
m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1
@ -1704,11 +1704,11 @@ MonoBehaviour:
m_DrawArea:
serializedVersion: 2
x: 0
y: 21
y: 0
width: 1027.5
height: 455
height: 476
m_Scale: {x: 2, y: 2}
m_Translation: {x: 513.75, y: 227.5}
m_Translation: {x: 513.75, y: 238}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
@ -1716,9 +1716,9 @@ MonoBehaviour:
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -256.875
y: -113.75
y: -119
width: 513.75
height: 227.5
height: 238
m_MinimalGUI: 1
m_defaultScale: 2
m_LastWindowPixelSize: {x: 2055, y: 952}