init
This commit is contained in:
commit
341a877b4a
2338 changed files with 1346408 additions and 0 deletions
14660
Assets/Particles/BulletExplosion/BulletExplosion.prefab
Normal file
14660
Assets/Particles/BulletExplosion/BulletExplosion.prefab
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c8bd3b8d6ab302a498f7e8a6f27dfc87
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
33
Assets/Particles/BulletExplosion/BulletExplosion_Mat.mat
Normal file
33
Assets/Particles/BulletExplosion/BulletExplosion_Mat.mat
Normal file
|
@ -0,0 +1,33 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BulletExplosion_Mat
|
||||
m_Shader: {fileID: 4800000, guid: f2fc837adfc478249be2e825bb434bdd, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _Texture:
|
||||
m_Texture: {fileID: 2800000, guid: dfee187e252b8ea44a5451b65f7e7e2f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Density: 0.982
|
||||
- _Rad1: 1
|
||||
- _Rad2: 0
|
||||
m_Colors:
|
||||
- _Col1: {r: 2.9960785, g: 2.619608, b: 2.1490197, a: 1}
|
||||
- _Col2: {r: 2.9960785, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 83fbb942645c23e4f8b8ce85cad9f41b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,97 @@
|
|||
Shader "Unlit/BulletExplosion_Shader"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Rad1("Radius 1", Range(0, 1))=1
|
||||
_Rad2("Radius 2", Range(0, 1))=0.1
|
||||
_Density("Density", Range(0, 1))=1
|
||||
[HDR]
|
||||
_Col1("Start color", Color)=(1, .55, 0, 1)
|
||||
[HDR]
|
||||
_Col2("End color", Color)=(1, 0, 0, 1)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Transparent" "Queue" = "Transparent" }
|
||||
Cull Off
|
||||
Blend SrcAlpha One
|
||||
ZWrite Off
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
// make fog work
|
||||
#pragma multi_compile_fog
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "include.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float4 color : COLOR;
|
||||
float4 uv : TEXCOORD0;
|
||||
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float age : TEXCOORD1;
|
||||
float4 color : COLOR;
|
||||
float colorModulation : TEXCOORD2;
|
||||
};
|
||||
|
||||
sampler2D _Texture;
|
||||
float4 _Texture_ST;
|
||||
|
||||
float _Rad1;
|
||||
float _Rad2;
|
||||
float _Density;
|
||||
float4 _Col1;
|
||||
float4 _Col2;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.color = v.color;
|
||||
o.uv = v.uv.xy;
|
||||
o.age = v.uv.z;
|
||||
o.colorModulation = v.uv.w;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{/*
|
||||
fixed4 tex = tex2D(_Texture, i.uv);
|
||||
|
||||
float mask = lerp(tex.b+tex.g, tex.g, i.age);
|
||||
float4 col = tex.g*lerp(_Col1, _Col2, i.age) + tex.b*_Col2;
|
||||
|
||||
col *= mask;
|
||||
col.a *= i.color.a;*/
|
||||
|
||||
_Rad2 = i.age;
|
||||
_Rad2 = 1 - pow(1 - _Rad2, 3);
|
||||
|
||||
|
||||
float radialMask1 = 1-smoothstep(_Density/2, .5, length( 1/_Rad1*(i.uv - 0.5f)));
|
||||
float radialMask2 = 1-smoothstep(_Density/2, .5, length(1/_Rad2*(i.uv - 0.5f)));
|
||||
float donutMask = radialMask1 - radialMask2;
|
||||
|
||||
float t = i.colorModulation;
|
||||
|
||||
float4 color = donutMask * lerp(_Col1, _Col2, t);
|
||||
|
||||
return fixed4(color);;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f2fc837adfc478249be2e825bb434bdd
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
61
Assets/Particles/BulletExplosion/ParticleTex_Shader.shader
Normal file
61
Assets/Particles/BulletExplosion/ParticleTex_Shader.shader
Normal file
|
@ -0,0 +1,61 @@
|
|||
Shader "Unlit/ParticleTex_Shader"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Transparent" "Queue" = "Transparent" }
|
||||
Cull Off
|
||||
Blend SrcAlpha One
|
||||
ZWrite Off
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
// make fog work
|
||||
#pragma multi_compile_fog
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_FOG_COORDS(1)
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
v.color = o.color;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
// sample the texture
|
||||
fixed4 col = tex2D(_MainTex, i.uv);
|
||||
return col * i.color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 020cc5fcf7d4bad4bae6a911bf7ba3bd
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Particles/BulletExplosion/bulletExplosion.png
Normal file
BIN
Assets/Particles/BulletExplosion/bulletExplosion.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
106
Assets/Particles/BulletExplosion/bulletExplosion.png.meta
Normal file
106
Assets/Particles/BulletExplosion/bulletExplosion.png.meta
Normal file
|
@ -0,0 +1,106 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dfee187e252b8ea44a5451b65f7e7e2f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
32
Assets/Particles/BulletExplosion/dot.mat
Normal file
32
Assets/Particles/BulletExplosion/dot.mat
Normal file
|
@ -0,0 +1,32 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: dot
|
||||
m_Shader: {fileID: 4800000, guid: a4102a78ee876a3418a32ab95e78dc79, type: 3}
|
||||
m_ShaderKeywords:
|
||||
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: 1e69020e1a38e114faad775538ba6976, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Density: 1
|
||||
- _Rad: 1
|
||||
m_Colors:
|
||||
- _Col: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 2.0635512, g: 0, b: 4.78613, a: 1}
|
||||
m_BuildTextureStacks: []
|
8
Assets/Particles/BulletExplosion/dot.mat.meta
Normal file
8
Assets/Particles/BulletExplosion/dot.mat.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 67884f8530d51654898c1a5b7434899f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
32
Assets/Particles/BulletExplosion/flareDots.mat
Normal file
32
Assets/Particles/BulletExplosion/flareDots.mat
Normal file
|
@ -0,0 +1,32 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: flareDots
|
||||
m_Shader: {fileID: 4800000, guid: a4102a78ee876a3418a32ab95e78dc79, type: 3}
|
||||
m_ShaderKeywords:
|
||||
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: 1e69020e1a38e114faad775538ba6976, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Density: 1
|
||||
- _Rad: 1
|
||||
m_Colors:
|
||||
- _Col: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 4.78613, g: 0.02, b: 0.1, a: 1}
|
||||
m_BuildTextureStacks: []
|
8
Assets/Particles/BulletExplosion/flareDots.mat.meta
Normal file
8
Assets/Particles/BulletExplosion/flareDots.mat.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 06da166f9cdb41144b94c8b6a635a1c3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
42
Assets/Particles/BulletExplosion/include.cginc
Normal file
42
Assets/Particles/BulletExplosion/include.cginc
Normal file
|
@ -0,0 +1,42 @@
|
|||
float3 hueShift(float3 color, float hueAdjust) {
|
||||
|
||||
const float3 kRGBToYPrime = float3(0.299, 0.587, 0.114);
|
||||
const float3 kRGBToI = float3(0.596, -0.275, -0.321);
|
||||
const float3 kRGBToQ = float3(0.212, -0.523, 0.311);
|
||||
|
||||
const float3 kYIQToR = float3(1.0, 0.956, 0.621);
|
||||
const float3 kYIQToG = float3(1.0, -0.272, -0.647);
|
||||
const float3 kYIQToB = float3(1.0, -1.107, 1.704);
|
||||
|
||||
float YPrime = dot(color, kRGBToYPrime);
|
||||
float I = dot(color, kRGBToI);
|
||||
float Q = dot(color, kRGBToQ);
|
||||
float hue = atan2(Q, I);
|
||||
float chroma = sqrt(I * I + Q * Q);
|
||||
|
||||
hue += hueAdjust;
|
||||
|
||||
Q = chroma * sin(hue);
|
||||
I = chroma * cos(hue);
|
||||
|
||||
float3 yIQ = float3(YPrime, I, Q);
|
||||
|
||||
return float3(dot(yIQ, kYIQToR), dot(yIQ, kYIQToG), dot(yIQ, kYIQToB));
|
||||
|
||||
}
|
||||
|
||||
float2 uvRot(float2 uv, float angle) {
|
||||
return mul(float2x2(cos(angle), -sin(angle), sin(angle), cos(angle)), uv);
|
||||
}
|
||||
|
||||
float lerp3(float a, float b, float c, float t)
|
||||
{
|
||||
if (t < 0.5f)
|
||||
{
|
||||
return lerp(a, b, t * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return lerp(b, c, (t-0.5f)*2);
|
||||
}
|
||||
}
|
9
Assets/Particles/BulletExplosion/include.cginc.meta
Normal file
9
Assets/Particles/BulletExplosion/include.cginc.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b38c3e153f236d449826f3fb5ae674b5
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue