├── .gitattributes ├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── Shaders.meta │ └── Shaders │ │ ├── blur.cginc │ │ ├── celColoredOutline.shader │ │ ├── celColoredOutline.shader.meta │ │ ├── celEffects.shader │ │ ├── celEffects.shader.meta │ │ ├── celEffectsDottedOutline.shader │ │ ├── celEffectsDottedOutline.shader.meta │ │ ├── celSimple.shader │ │ ├── celSimple.shader.meta │ │ ├── celWithShadow.shader │ │ ├── celWithShadow.shader.meta │ │ ├── celWithSnow.shader │ │ ├── celWithSnow.shader.meta │ │ ├── diffuseHighlights.shader │ │ ├── diffuseSimpleShadow.shader │ │ ├── diffuseSimpleShadow.shader.meta │ │ ├── dissolve.shader │ │ ├── dissolve.shader.meta │ │ ├── distort.shader │ │ ├── galaxyMask.shader │ │ ├── galaxyMask.shader.meta │ │ ├── glass.shader │ │ ├── glass.shader.meta │ │ ├── grass.shader │ │ ├── grass.shader.meta │ │ ├── ice.shader │ │ ├── ice.shader.meta │ │ ├── silouetteBehindStuff.shader │ │ ├── snow.shader │ │ ├── snow.shader.meta │ │ ├── water.shader │ │ ├── water.shader.meta │ │ ├── waterWaves.shader │ │ ├── waterWaves.shader.meta │ │ └── window.shader ├── ProcGeo.cs └── Scripts │ ├── BloomLin.cs.meta │ ├── DepthTexture.cs │ ├── DepthTexture.cs.meta │ ├── DrawOnTexture.cs │ ├── HeatmapCam.cs.meta │ ├── PostProcess.cs.meta │ ├── ProcGeo.cs.meta │ ├── ProcGeoCube.cs │ ├── ProcGeoCube.cs.meta │ ├── RecalcBounds.cs │ ├── RecalcBounds.cs.meta │ ├── Rotate.cs.meta │ ├── Shaders.meta │ ├── Shape.cs │ └── Shape.cs.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md └── UnityPackageManager └── manifest.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d195497ab5374d40a6a5dd94588ee09 3 | folderAsset: yes 4 | timeCreated: 1513239860 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 719c2b8a364b2234f8cbc17b7e01ee35 3 | folderAsset: yes 4 | timeCreated: 1499470969 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/blur.cginc: -------------------------------------------------------------------------------- 1 | // https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson5 2 | float4 gaussianBlur(float2 dir, float4 grabPos, float res, sampler2D tex, float radius) 3 | { 4 | //this will be our RGBA sum 5 | float4 sum = float4(0, 0, 0, 0); 6 | 7 | //the amount to blur, i.e. how far off center to sample from 8 | //1.0 -> blur by one pixel 9 | //2.0 -> blur by two pixels, etc. 10 | float blur = radius / res; 11 | 12 | //the direction of our blur 13 | //(1.0, 0.0) -> x-axis blur 14 | //(0.0, 1.0) -> y-axis blur 15 | float hstep = dir.x; 16 | float vstep = dir.y; 17 | 18 | //apply blurring, using a 9-tap filter with predefined gaussian weights 19 | 20 | sum += tex2Dproj(tex, float4(grabPos.x - 4*blur*hstep, grabPos.y - 4.0*blur*vstep, grabPos.zw)) * 0.0162162162; 21 | sum += tex2Dproj(tex, float4(grabPos.x - 3.0*blur*hstep, grabPos.y - 3.0*blur*vstep, grabPos.zw)) * 0.0540540541; 22 | sum += tex2Dproj(tex, float4(grabPos.x - 2.0*blur*hstep, grabPos.y - 2.0*blur*vstep, grabPos.zw)) * 0.1216216216; 23 | sum += tex2Dproj(tex, float4(grabPos.x - 1.0*blur*hstep, grabPos.y - 1.0*blur*vstep, grabPos.zw)) * 0.1945945946; 24 | 25 | sum += tex2Dproj(tex, float4(grabPos.x, grabPos.y, grabPos.zw)) * 0.2270270270; 26 | 27 | sum += tex2Dproj(tex, float4(grabPos.x + 1.0*blur*hstep, grabPos.y + 1.0*blur*vstep, grabPos.zw)) * 0.1945945946; 28 | sum += tex2Dproj(tex, float4(grabPos.x + 2.0*blur*hstep, grabPos.y + 2.0*blur*vstep, grabPos.zw)) * 0.1216216216; 29 | sum += tex2Dproj(tex, float4(grabPos.x + 3.0*blur*hstep, grabPos.y + 3.0*blur*vstep, grabPos.zw)) * 0.0540540541; 30 | sum += tex2Dproj(tex, float4(grabPos.x + 4.0*blur*hstep, grabPos.y + 4.0*blur*vstep, grabPos.zw)) * 0.0162162162; 31 | 32 | return float4(sum.rgb, 1.0); 33 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celColoredOutline.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelColoredOutline" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | _OutlineExtrusion("Outline Extrusion", float) = 0 9 | _OutlineColor("Outline Color", Color) = (0, 0, 0, 1) 10 | } 11 | 12 | SubShader 13 | { 14 | // Regular color & lighting pass 15 | Pass 16 | { 17 | Tags 18 | { 19 | "LightMode" = "ForwardBase" // allows shadow rec/cast 20 | } 21 | 22 | // Write to Stencil buffer (so that outline pass can read) 23 | Stencil 24 | { 25 | Ref 4 26 | Comp always 27 | Pass replace 28 | ZFail keep 29 | } 30 | 31 | CGPROGRAM 32 | #pragma vertex vert 33 | #pragma fragment frag 34 | #pragma multi_compile_fwdbase // shadows 35 | #include "AutoLight.cginc" 36 | #include "UnityCG.cginc" 37 | 38 | // Properties 39 | sampler2D _MainTex; 40 | sampler2D _RampTex; 41 | float4 _Color; 42 | float4 _LightColor0; // provided by Unity 43 | 44 | struct vertexInput 45 | { 46 | float4 vertex : POSITION; 47 | float3 normal : NORMAL; 48 | float3 texCoord : TEXCOORD0; 49 | }; 50 | 51 | struct vertexOutput 52 | { 53 | float4 pos : SV_POSITION; 54 | float3 normal : NORMAL; 55 | float3 texCoord : TEXCOORD0; 56 | LIGHTING_COORDS(1,2) // shadows 57 | }; 58 | 59 | vertexOutput vert(vertexInput input) 60 | { 61 | vertexOutput output; 62 | 63 | // convert input to world space 64 | output.pos = UnityObjectToClipPos(input.vertex); 65 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 66 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 67 | 68 | output.texCoord = input.texCoord; 69 | 70 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 71 | return output; 72 | } 73 | 74 | float4 frag(vertexOutput input) : COLOR 75 | { 76 | // lighting mode 77 | 78 | // convert light direction to world space & normalize 79 | // _WorldSpaceLightPos0 provided by Unity 80 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 81 | 82 | // finds location on ramp texture that we should sample 83 | // based on angle between surface normal and light direction 84 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 85 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 86 | 87 | // sample texture for color 88 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 89 | 90 | float attenuation = LIGHT_ATTENUATION(input); // shadow value 91 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * _Color.rgb * attenuation; 92 | return float4(rgb, 1.0); 93 | } 94 | 95 | ENDCG 96 | } 97 | 98 | // Shadow pass 99 | Pass 100 | { 101 | Tags 102 | { 103 | "LightMode" = "ShadowCaster" 104 | } 105 | 106 | CGPROGRAM 107 | #pragma vertex vert 108 | #pragma fragment frag 109 | #pragma multi_compile_shadowcaster 110 | #include "UnityCG.cginc" 111 | 112 | struct v2f { 113 | V2F_SHADOW_CASTER; 114 | }; 115 | 116 | v2f vert(appdata_base v) 117 | { 118 | v2f o; 119 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 120 | return o; 121 | } 122 | 123 | float4 frag(v2f i) : SV_Target 124 | { 125 | SHADOW_CASTER_FRAGMENT(i) 126 | } 127 | ENDCG 128 | } 129 | 130 | // Outline pass 131 | Pass 132 | { 133 | // Won't draw where it sees ref value 4 134 | Cull OFF 135 | ZWrite OFF 136 | ZTest ON 137 | Stencil 138 | { 139 | Ref 4 140 | Comp notequal 141 | Fail keep 142 | Pass replace 143 | } 144 | 145 | CGPROGRAM 146 | #pragma vertex vert 147 | #pragma fragment frag 148 | 149 | // Properties 150 | uniform float4 _OutlineColor; 151 | uniform float _OutlineSize; 152 | uniform float _OutlineExtrusion; 153 | sampler2D _MainTex; 154 | 155 | struct vertexInput 156 | { 157 | float4 vertex : POSITION; 158 | float3 normal : NORMAL; 159 | float3 texCoord : TEXCOORD0; 160 | float4 color : TEXCOORD1; 161 | }; 162 | 163 | struct vertexOutput 164 | { 165 | float4 pos : SV_POSITION; 166 | float4 color : TEXCOORD0; 167 | }; 168 | 169 | vertexOutput vert(vertexInput input) 170 | { 171 | vertexOutput output; 172 | 173 | float4 newPos = input.vertex; 174 | 175 | // normal extrusion technique 176 | float3 normal = normalize(input.normal); 177 | newPos += float4(normal, 0.0) * _OutlineExtrusion; 178 | 179 | // convert to world space 180 | output.pos = UnityObjectToClipPos(newPos); 181 | 182 | output.color = tex2Dlod(_MainTex, float4(input.texCoord.xy, 0, 0)); 183 | output.color *= _OutlineColor; 184 | 185 | return output; 186 | } 187 | 188 | float4 frag(vertexOutput input) : COLOR 189 | { 190 | //float4 color = input.color * _OutlineColor; 191 | return input.color; 192 | } 193 | 194 | ENDCG 195 | } 196 | } 197 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celColoredOutline.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ae50923f7c378845aa467f9c49146b2 3 | timeCreated: 1516489880 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celEffects.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelEffects" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | _OutlineExtrusion("Outline Extrusion", float) = 0 9 | _OutlineColor("Outline Color", Color) = (0, 0, 0, 1) 10 | _OutlineDot("Outline Dot", float) = 0.25 11 | } 12 | 13 | SubShader 14 | { 15 | // Regular color & lighting pass 16 | Pass 17 | { 18 | Tags 19 | { 20 | "LightMode" = "ForwardBase" // allows shadow rec/cast 21 | } 22 | 23 | // Write to Stencil buffer (so that outline pass can read) 24 | Stencil 25 | { 26 | Ref 4 27 | Comp always 28 | Pass replace 29 | ZFail keep 30 | } 31 | 32 | CGPROGRAM 33 | #pragma vertex vert 34 | #pragma fragment frag 35 | #pragma multi_compile_fwdbase // shadows 36 | #include "AutoLight.cginc" 37 | #include "UnityCG.cginc" 38 | 39 | // Properties 40 | sampler2D _MainTex; 41 | sampler2D _RampTex; 42 | float4 _Color; 43 | float4 _LightColor0; // provided by Unity 44 | 45 | struct vertexInput 46 | { 47 | float4 vertex : POSITION; 48 | float3 normal : NORMAL; 49 | float3 texCoord : TEXCOORD0; 50 | }; 51 | 52 | struct vertexOutput 53 | { 54 | float4 pos : SV_POSITION; 55 | float3 normal : NORMAL; 56 | float3 texCoord : TEXCOORD0; 57 | LIGHTING_COORDS(1,2) // shadows 58 | }; 59 | 60 | vertexOutput vert(vertexInput input) 61 | { 62 | vertexOutput output; 63 | 64 | // convert input to world space 65 | output.pos = UnityObjectToClipPos(input.vertex); 66 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 67 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 68 | 69 | output.texCoord = input.texCoord; 70 | 71 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 72 | return output; 73 | } 74 | 75 | float4 frag(vertexOutput input) : COLOR 76 | { 77 | // lighting mode 78 | 79 | // convert light direction to world space & normalize 80 | // _WorldSpaceLightPos0 provided by Unity 81 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 82 | 83 | // finds location on ramp texture that we should sample 84 | // based on angle between surface normal and light direction 85 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 86 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 87 | 88 | // sample texture for color 89 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 90 | 91 | float attenuation = LIGHT_ATTENUATION(input); // shadow value 92 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * _Color.rgb * attenuation; 93 | return float4(rgb, 1.0); 94 | } 95 | 96 | ENDCG 97 | } 98 | 99 | // Shadow pass 100 | Pass 101 | { 102 | Tags 103 | { 104 | "LightMode" = "ShadowCaster" 105 | } 106 | 107 | CGPROGRAM 108 | #pragma vertex vert 109 | #pragma fragment frag 110 | #pragma multi_compile_shadowcaster 111 | #include "UnityCG.cginc" 112 | 113 | struct v2f { 114 | V2F_SHADOW_CASTER; 115 | }; 116 | 117 | v2f vert(appdata_base v) 118 | { 119 | v2f o; 120 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 121 | return o; 122 | } 123 | 124 | float4 frag(v2f i) : SV_Target 125 | { 126 | SHADOW_CASTER_FRAGMENT(i) 127 | } 128 | ENDCG 129 | } 130 | 131 | // Outline pass 132 | Pass 133 | { 134 | // Won't draw where it sees ref value 4 135 | Cull OFF 136 | ZWrite OFF 137 | ZTest ON 138 | Stencil 139 | { 140 | Ref 4 141 | Comp notequal 142 | Fail keep 143 | Pass replace 144 | } 145 | 146 | CGPROGRAM 147 | #pragma vertex vert 148 | #pragma fragment frag 149 | 150 | // Properties 151 | uniform float4 _OutlineColor; 152 | uniform float _OutlineSize; 153 | uniform float _OutlineExtrusion; 154 | uniform float _OutlineDot; 155 | 156 | struct vertexInput 157 | { 158 | float4 vertex : POSITION; 159 | float3 normal : NORMAL; 160 | }; 161 | 162 | struct vertexOutput 163 | { 164 | float4 pos : SV_POSITION; 165 | float4 color : COLOR; 166 | }; 167 | 168 | vertexOutput vert(vertexInput input) 169 | { 170 | vertexOutput output; 171 | 172 | float4 newPos = input.vertex; 173 | 174 | // normal extrusion technique 175 | float3 normal = normalize(input.normal); 176 | newPos += float4(normal, 0.0) * _OutlineExtrusion; 177 | 178 | // convert to world space 179 | output.pos = UnityObjectToClipPos(newPos); 180 | 181 | output.color = _OutlineColor; 182 | return output; 183 | } 184 | 185 | float4 frag(vertexOutput input) : COLOR 186 | { 187 | // checker value will be negative for 4x4 blocks of pixels 188 | // in a checkerboard pattern 189 | //input.pos.xy = floor(input.pos.xy * _OutlineDot) * 0.5; 190 | //float checker = -frac(input.pos.r + input.pos.g); 191 | 192 | // clip HLSL instruction stops rendering a pixel if value is negative 193 | //clip(checker); 194 | 195 | return input.color; 196 | } 197 | 198 | ENDCG 199 | } 200 | } 201 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celEffects.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8310ead1331df3b438e35a83eb58ffa4 3 | timeCreated: 1500784685 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celEffectsDottedOutline.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelEffectsDottedOutline" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | _OutlineExtrusion("Outline Extrusion", float) = 0 9 | _OutlineColor("Outline Color", Color) = (0, 0, 0, 1) 10 | _OutlineDot("Outline Dot", float) = 0.25 11 | _OutlineDot2("Outline Dot Distance", float) = 0.5 12 | _OutlineSpeed("Outline Dot Speed", float) = 50.0 13 | _SourcePos("Source Position", vector) = (0, 0, 0, 0) 14 | } 15 | 16 | SubShader 17 | { 18 | // Regular color & lighting pass 19 | Pass 20 | { 21 | Tags 22 | { 23 | "LightMode" = "ForwardBase" // allows shadow rec/cast 24 | } 25 | 26 | // Write to Stencil buffer (so that outline pass can read) 27 | Stencil 28 | { 29 | Ref 4 30 | Comp always 31 | Pass replace 32 | ZFail keep 33 | } 34 | 35 | CGPROGRAM 36 | #pragma vertex vert 37 | #pragma fragment frag 38 | #pragma multi_compile_fwdbase // shadows 39 | #include "AutoLight.cginc" 40 | #include "UnityCG.cginc" 41 | 42 | // Properties 43 | sampler2D _MainTex; 44 | sampler2D _RampTex; 45 | float4 _Color; 46 | float4 _LightColor0; // provided by Unity 47 | 48 | struct vertexInput 49 | { 50 | float4 vertex : POSITION; 51 | float3 normal : NORMAL; 52 | float3 texCoord : TEXCOORD0; 53 | }; 54 | 55 | struct vertexOutput 56 | { 57 | float4 pos : SV_POSITION; 58 | float3 normal : NORMAL; 59 | float3 texCoord : TEXCOORD0; 60 | LIGHTING_COORDS(1,2) // shadows 61 | }; 62 | 63 | vertexOutput vert(vertexInput input) 64 | { 65 | vertexOutput output; 66 | 67 | // convert input to world space 68 | output.pos = UnityObjectToClipPos(input.vertex); 69 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 70 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 71 | 72 | output.texCoord = input.texCoord; 73 | 74 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 75 | return output; 76 | } 77 | 78 | float4 frag(vertexOutput input) : COLOR 79 | { 80 | // lighting mode 81 | 82 | // convert light direction to world space & normalize 83 | // _WorldSpaceLightPos0 provided by Unity 84 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 85 | 86 | // finds location on ramp texture that we should sample 87 | // based on angle between surface normal and light direction 88 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 89 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 90 | 91 | // sample texture for color 92 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 93 | 94 | float attenuation = LIGHT_ATTENUATION(input); // shadow value 95 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * _Color.rgb * attenuation; 96 | return float4(rgb, 1.0); 97 | } 98 | 99 | ENDCG 100 | } 101 | 102 | // Shadow pass 103 | Pass 104 | { 105 | Tags 106 | { 107 | "LightMode" = "ShadowCaster" 108 | } 109 | 110 | CGPROGRAM 111 | #pragma vertex vert 112 | #pragma fragment frag 113 | #pragma multi_compile_shadowcaster 114 | #include "UnityCG.cginc" 115 | 116 | struct v2f { 117 | V2F_SHADOW_CASTER; 118 | }; 119 | 120 | v2f vert(appdata_base v) 121 | { 122 | v2f o; 123 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 124 | return o; 125 | } 126 | 127 | float4 frag(v2f i) : SV_Target 128 | { 129 | SHADOW_CASTER_FRAGMENT(i) 130 | } 131 | ENDCG 132 | } 133 | 134 | // Outline pass 135 | Pass 136 | { 137 | // Won't draw where it sees ref value 4 138 | Cull OFF 139 | ZWrite OFF 140 | ZTest ON 141 | Stencil 142 | { 143 | Ref 4 144 | Comp notequal 145 | Fail keep 146 | Pass replace 147 | } 148 | 149 | CGPROGRAM 150 | #pragma vertex vert 151 | #pragma fragment frag 152 | #include "UnityCG.cginc" 153 | 154 | // Properties 155 | float4 _OutlineColor; 156 | float _OutlineSize; 157 | float _OutlineExtrusion; 158 | float _OutlineDot; 159 | float _OutlineDot2; 160 | float _OutlineSpeed; 161 | float4 _SourcePos; 162 | 163 | struct vertexInput 164 | { 165 | float4 vertex : POSITION; 166 | float3 normal : NORMAL; 167 | }; 168 | 169 | struct vertexOutput 170 | { 171 | float4 pos : SV_POSITION; 172 | float4 screenCoord : TEXCOORD0; 173 | }; 174 | 175 | vertexOutput vert(vertexInput input) 176 | { 177 | vertexOutput output; 178 | 179 | float4 newPos = input.vertex; 180 | 181 | // normal extrusion technique 182 | float3 normal = normalize(input.normal); 183 | newPos += float4(normal, 0.0) * _OutlineExtrusion; 184 | 185 | // convert to world space 186 | output.pos = UnityObjectToClipPos(newPos); 187 | 188 | // get screen coordinates 189 | output.screenCoord = ComputeScreenPos(output.pos); 190 | 191 | return output; 192 | } 193 | 194 | float4 frag(vertexOutput input) : COLOR 195 | { 196 | // dotted line with animation 197 | // if you want to remove the animation, remove "+ _Time * _OutlineSpeed" 198 | float2 pos = input.pos.xy + _Time * _OutlineSpeed; 199 | float skip = sin(_OutlineDot*abs(distance(_SourcePos.xy, pos))) + _OutlineDot2; 200 | clip(skip); // stops rendering a pixel if 'skip' is negative 201 | 202 | float4 color = _OutlineColor; 203 | return color; 204 | } 205 | 206 | ENDCG 207 | } 208 | } 209 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celEffectsDottedOutline.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d277bbfb91b655408b992b9e3fdaf51 3 | timeCreated: 1513421499 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celSimple.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelSimple" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | } 9 | 10 | SubShader 11 | { 12 | // Regular color & lighting pass 13 | Pass 14 | { 15 | CGPROGRAM 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | 19 | // Properties 20 | sampler2D _MainTex; 21 | sampler2D _RampTex; 22 | float4 _Color; 23 | float4 _LightColor0; // provided by Unity 24 | 25 | struct vertexInput 26 | { 27 | float4 vertex : POSITION; 28 | float3 normal : NORMAL; 29 | float3 texCoord : TEXCOORD0; 30 | }; 31 | 32 | struct vertexOutput 33 | { 34 | float4 pos : SV_POSITION; 35 | float3 normal : NORMAL; 36 | float3 texCoord : TEXCOORD0; 37 | }; 38 | 39 | vertexOutput vert(vertexInput input) 40 | { 41 | vertexOutput output; 42 | 43 | // convert input to world space 44 | output.pos = UnityObjectToClipPos(input.vertex); 45 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 46 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 47 | 48 | output.texCoord = input.texCoord; 49 | 50 | return output; 51 | } 52 | 53 | float4 frag(vertexOutput input) : COLOR 54 | { 55 | // convert light direction to world space & normalize 56 | // _WorldSpaceLightPos0 provided by Unity 57 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 58 | 59 | // finds location on ramp texture that we should sample 60 | // based on angle between surface normal and light direction 61 | float ramp = clamp(dot(input.normal, lightDir), 0.001, 1.0); 62 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 63 | 64 | // sample texture for color 65 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 66 | 67 | // _LightColor0 provided by Unity 68 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * _Color.rgb; 69 | return float4(rgb, 1.0); 70 | } 71 | 72 | ENDCG 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celSimple.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe1b1a7bee794ea4ca24a38925cae3d4 3 | timeCreated: 1500166826 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celWithShadow.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelWithShadow" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | } 9 | 10 | SubShader 11 | { 12 | // Regular color & lighting pass 13 | Pass 14 | { 15 | Tags 16 | { 17 | "LightMode" = "ForwardBase" // allows shadow rec/cast 18 | } 19 | 20 | CGPROGRAM 21 | #pragma vertex vert 22 | #pragma fragment frag 23 | #pragma multi_compile_fwdbase // shadows 24 | #include "AutoLight.cginc" 25 | #include "UnityCG.cginc" 26 | 27 | // Properties 28 | sampler2D _MainTex; 29 | sampler2D _RampTex; 30 | float4 _Color; 31 | float4 _LightColor0; // provided by Unity 32 | 33 | struct vertexInput 34 | { 35 | float4 vertex : POSITION; 36 | float3 normal : NORMAL; 37 | float3 texCoord : TEXCOORD0; 38 | }; 39 | 40 | struct vertexOutput 41 | { 42 | float4 pos : SV_POSITION; 43 | float3 normal : NORMAL; 44 | float3 texCoord : TEXCOORD0; 45 | LIGHTING_COORDS(1,2) // shadows 46 | }; 47 | 48 | vertexOutput vert(vertexInput input) 49 | { 50 | vertexOutput output; 51 | 52 | // convert input to world space 53 | output.pos = UnityObjectToClipPos(input.vertex); 54 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 55 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 56 | 57 | output.texCoord = input.texCoord; 58 | 59 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 60 | return output; 61 | } 62 | 63 | float4 frag(vertexOutput input) : COLOR 64 | { 65 | // convert light direction to world space & normalize 66 | // _WorldSpaceLightPos0 provided by Unity 67 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 68 | 69 | // finds location on ramp texture that we should sample 70 | // based on angle between surface normal and light direction 71 | float ramp = clamp(dot(input.normal, lightDir), 0.001, 1.0); 72 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 73 | 74 | // sample texture for color 75 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 76 | 77 | float attenuation = LIGHT_ATTENUATION(input); // shadow value 78 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * _Color.rgb * attenuation; 79 | return float4(rgb, 1.0); 80 | } 81 | 82 | ENDCG 83 | } 84 | 85 | // Shadow pass 86 | Pass 87 | { 88 | Tags 89 | { 90 | "LightMode" = "ShadowCaster" 91 | } 92 | 93 | CGPROGRAM 94 | #pragma vertex vert 95 | #pragma fragment frag 96 | #pragma multi_compile_shadowcaster 97 | #include "UnityCG.cginc" 98 | 99 | struct v2f { 100 | V2F_SHADOW_CASTER; 101 | }; 102 | 103 | v2f vert(appdata_base v) 104 | { 105 | v2f o; 106 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 107 | return o; 108 | } 109 | 110 | float4 frag(v2f i) : SV_Target 111 | { 112 | SHADOW_CASTER_FRAGMENT(i) 113 | } 114 | ENDCG 115 | } 116 | 117 | 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celWithShadow.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd5a1e17c7b45c94396713b4ee2211d6 3 | timeCreated: 1513259213 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celWithSnow.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/CelWithSnow" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _Color("Color", Color) = (1, 1, 1, 1) 8 | _SnowLevel("Snow Level", Range(0.01, -0.01)) = 0 9 | _SnowColor("Snow Color", Color) = (1, 1, 1, 1) 10 | _SnowBump("Snow Bump Texture", 2D) = "white" {} 11 | _SnowRamp("Snow Ramp Texture", 2D) = "white" {} 12 | _SnowDirection("Snow Direction", vector) = (1, 1, 1, 1) 13 | } 14 | 15 | SubShader 16 | { 17 | // Regular color & lighting pass 18 | Pass 19 | { 20 | Tags 21 | { 22 | "LightMode" = "ForwardBase" // allows shadow rec/cast 23 | } 24 | 25 | CGPROGRAM 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | #pragma multi_compile_fwdbase // shadows 29 | #include "AutoLight.cginc" 30 | #include "UnityCG.cginc" 31 | 32 | // Properties 33 | sampler2D _MainTex; 34 | sampler2D _RampTex; 35 | sampler2D _SnowBump; 36 | sampler2D _SnowRamp; 37 | float4 _Color; 38 | float4 _SnowColor; 39 | float4 _SnowDirection; 40 | float _SnowLevel; 41 | float4 _LightColor0; // provided by Unity 42 | 43 | struct vertexInput 44 | { 45 | float4 vertex : POSITION; 46 | float3 normal : NORMAL; 47 | float3 texCoord : TEXCOORD0; 48 | }; 49 | 50 | struct vertexOutput 51 | { 52 | float4 pos : SV_POSITION; 53 | float3 normal : NORMAL; 54 | float3 texCoord : TEXCOORD0; 55 | float4 snowDir : TEXCOORD1; 56 | LIGHTING_COORDS(2,3) // shadows 57 | }; 58 | 59 | vertexOutput vert(vertexInput input) 60 | { 61 | vertexOutput output; 62 | 63 | // convert input to world space 64 | output.pos = UnityObjectToClipPos(input.vertex); 65 | output.normal = normalize(mul(float4(input.normal, 0.0), unity_WorldToObject).xyz); 66 | output.snowDir = mul(_SnowDirection, unity_WorldToObject); 67 | 68 | // texture coordinates 69 | output.texCoord = input.texCoord; 70 | 71 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 72 | return output; 73 | } 74 | 75 | float4 frag(vertexOutput input) : COLOR 76 | { 77 | // normalize light direction 78 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 79 | 80 | // apply regular lighting 81 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 82 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 83 | 84 | // sample texture & apply Color 85 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 86 | albedo *= _Color; 87 | 88 | // check if snow should be applied 89 | float applySnow = dot(input.normal, input.snowDir) >= _SnowLevel; 90 | 91 | // apply snow color 92 | albedo = (1-applySnow)*albedo + applySnow*_SnowColor; 93 | 94 | // get snow bump map lighting 95 | float3 snowBump = tex2D(_SnowBump, input.texCoord.xy).rgb + input.normal.xyz; 96 | float snowRamp = clamp(dot(snowBump, lightDir), 0.001, 1.0); 97 | float3 snowLighting = tex2D(_SnowRamp, float2(snowRamp, 0.5)); 98 | snowLighting *= lighting; 99 | 100 | // use either snow lighting or regular lighting 101 | lighting = (1-applySnow)*lighting + applySnow*snowLighting; 102 | 103 | // shadows 104 | float attenuation = LIGHT_ATTENUATION(input); 105 | 106 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * attenuation; 107 | return float4(rgb, 1.0); 108 | } 109 | 110 | ENDCG 111 | } 112 | 113 | // Shadow pass 114 | Pass 115 | { 116 | Tags 117 | { 118 | "LightMode" = "ShadowCaster" 119 | } 120 | 121 | CGPROGRAM 122 | #pragma vertex vert 123 | #pragma fragment frag 124 | #pragma multi_compile_shadowcaster 125 | #include "UnityCG.cginc" 126 | 127 | struct v2f { 128 | V2F_SHADOW_CASTER; 129 | }; 130 | 131 | v2f vert(appdata_base v) 132 | { 133 | v2f o; 134 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 135 | return o; 136 | } 137 | 138 | float4 frag(v2f i) : SV_Target 139 | { 140 | SHADOW_CASTER_FRAGMENT(i) 141 | } 142 | ENDCG 143 | } 144 | } 145 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/celWithSnow.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b53a09f3c9a96ab46809b7d0739d92b2 3 | timeCreated: 1513538977 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/diffuseHighlights.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/DiffuseHighlights" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _HighlightColor("Hightlight Color", Color) = (1, 1, 1, 1) 7 | _HighlightScale("Highlight Scale", float) = 1 8 | _BrightColor("Light Color", Color) = (1, 1, 1, 1) 9 | _DarkColor("Dark Color", Color) = (1, 1, 1, 1) 10 | _K("Shadow Intensity", float) = 1.0 11 | _P("Shadow Falloff", float) = 1.0 12 | } 13 | 14 | SubShader 15 | { 16 | // Outline pass 17 | Pass 18 | { 19 | Cull Front 20 | 21 | CGPROGRAM 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | 25 | // Properties 26 | uniform float4 _HighlightColor; 27 | uniform float _HighlightScale; 28 | 29 | struct vertexInput 30 | { 31 | float4 vertex : POSITION; 32 | float3 normal : NORMAL; 33 | float3 texCoord : TEXCOORD0; 34 | float4 color : TEXCOORD1; 35 | }; 36 | 37 | struct vertexOutput 38 | { 39 | float4 pos : SV_POSITION; 40 | }; 41 | 42 | vertexOutput vert(vertexInput input) 43 | { 44 | vertexOutput output; 45 | 46 | float4 newPos = input.vertex; 47 | 48 | float4 normal4 = float4(input.normal, 0.0); 49 | float3 normal = normalize(mul(normal4, unity_WorldToObject).xyz); 50 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 51 | 52 | float lightDot = saturate(dot(normal, lightDir)); 53 | newPos += float4(input.normal, 0.0) * lightDot * _HighlightScale; 54 | 55 | output.pos = UnityObjectToClipPos(newPos); 56 | 57 | return output; 58 | } 59 | 60 | float4 frag(vertexOutput input) : COLOR 61 | { 62 | return _HighlightColor; 63 | } 64 | ENDCG 65 | } 66 | 67 | // Regular color & lighting pass 68 | Pass 69 | { 70 | Tags 71 | { 72 | "LightMode" = "ForwardBase" // allows shadow rec/cast, lighting 73 | } 74 | 75 | CGPROGRAM 76 | #pragma vertex vert 77 | #pragma fragment frag 78 | #pragma multi_compile_fwdbase // shadows 79 | #include "AutoLight.cginc" 80 | #include "UnityCG.cginc" 81 | 82 | // Properties 83 | sampler2D _MainTex; 84 | sampler2D _SpecRamp; 85 | float4 _LightColor0; // provided by Unity 86 | float4 _BrightColor; 87 | float4 _DarkColor; 88 | float _K; 89 | float _P; 90 | 91 | struct vertexInput 92 | { 93 | float4 vertex : POSITION; 94 | float3 normal : NORMAL; 95 | float3 texCoord : TEXCOORD0; 96 | }; 97 | 98 | struct vertexOutput 99 | { 100 | float4 pos : SV_POSITION; 101 | float3 normal : NORMAL; 102 | float3 texCoord : TEXCOORD0; 103 | float3 viewDir: TEXCOORD1; 104 | LIGHTING_COORDS(2,3) // shadows 105 | }; 106 | 107 | vertexOutput vert(vertexInput input) 108 | { 109 | vertexOutput output; 110 | 111 | output.pos = UnityObjectToClipPos(input.vertex); 112 | float4 normal4 = float4(input.normal, 0.0); 113 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 114 | output.viewDir = normalize(_WorldSpaceCameraPos - mul(unity_ObjectToWorld, input.vertex).xyz); 115 | 116 | output.texCoord = input.texCoord; 117 | 118 | TRANSFER_SHADOW(output); // shadows 119 | return output; 120 | } 121 | 122 | float4 frag(vertexOutput input) : COLOR 123 | { 124 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 125 | 126 | float lightDot = clamp(dot(input.normal, lightDir), -1, 1); 127 | lightDot = exp(-pow(_K*(1 - lightDot), _P)); 128 | float3 light = lerp(_DarkColor, _BrightColor, lightDot); 129 | 130 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 131 | 132 | float attenuation = LIGHT_ATTENUATION(input); 133 | 134 | // multiply albedo and lighting 135 | float3 rgb = albedo.rgb * light * attenuation; 136 | return float4(rgb, 1.0); 137 | } 138 | 139 | ENDCG 140 | } 141 | 142 | // Shadow pass 143 | Pass 144 | { 145 | Tags 146 | { 147 | "LightMode" = "ShadowCaster" 148 | } 149 | 150 | CGPROGRAM 151 | #pragma vertex vert 152 | #pragma fragment frag 153 | #pragma multi_compile_shadowcaster 154 | #include "UnityCG.cginc" 155 | 156 | struct v2f { 157 | V2F_SHADOW_CASTER; 158 | }; 159 | 160 | v2f vert(appdata_base v) 161 | { 162 | v2f o; 163 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 164 | return o; 165 | } 166 | 167 | float4 frag(v2f i) : SV_Target 168 | { 169 | SHADOW_CASTER_FRAGMENT(i) 170 | } 171 | ENDCG 172 | } 173 | } 174 | Fallback "Diffuse" 175 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/diffuseSimpleShadow.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/SimpleDiffuseShadow" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _Color("Color", Color) = (1, 1, 1, 1) 7 | _BrightColor("Light Color", Color) = (1, 1, 1, 1) 8 | _DarkColor("Dark Color", Color) = (1, 1, 1, 1) 9 | _K("Shadow Intensity", float) = 1.0 10 | _P("Shadow Falloff", float) = 1.0 11 | } 12 | 13 | SubShader 14 | { 15 | // Regular color & lighting pass 16 | Pass 17 | { 18 | Tags 19 | { 20 | "LightMode" = "ForwardBase" // allows shadow rec/cast, lighting 21 | } 22 | 23 | CGPROGRAM 24 | #pragma vertex vert 25 | #pragma fragment frag 26 | #pragma multi_compile_fwdbase // shadows 27 | #include "AutoLight.cginc" 28 | #include "UnityCG.cginc" 29 | 30 | // Properties 31 | sampler2D _MainTex; 32 | float4 _Color; 33 | float4 _LightColor0; // provided by Unity 34 | float4 _BrightColor; 35 | float4 _DarkColor; 36 | float _K; 37 | float _P; 38 | 39 | struct vertexInput 40 | { 41 | float4 vertex : POSITION; 42 | float3 normal : NORMAL; 43 | float3 texCoord : TEXCOORD0; 44 | }; 45 | 46 | struct vertexOutput 47 | { 48 | float4 pos : SV_POSITION; 49 | float3 normal : NORMAL; 50 | float3 texCoord : TEXCOORD0; 51 | LIGHTING_COORDS(1,2) // shadows 52 | }; 53 | 54 | vertexOutput vert(vertexInput input) 55 | { 56 | vertexOutput output; 57 | 58 | output.pos = UnityObjectToClipPos(input.vertex); 59 | output.normal = UnityObjectToWorldNormal(input.normal); 60 | 61 | output.texCoord = input.texCoord; 62 | 63 | TRANSFER_SHADOW(output); // shadows 64 | return output; 65 | } 66 | 67 | float4 frag(vertexOutput input) : COLOR 68 | { 69 | // _WorldSpaceLightPos0 provided by Unity 70 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 71 | 72 | // get dot product between surface normal and light direction 73 | float lightDot = dot(input.normal, lightDir); 74 | // do some math to make lighting falloff smooth 75 | lightDot = exp(-pow(_K*(1 - lightDot), _P)); 76 | 77 | // lerp lighting between light & dark value 78 | //float3 light = lerp(_DarkColor, _BrightColor, lightDot); 79 | 80 | // sample texture for color 81 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 82 | 83 | // shadow value 84 | //float attenuation = LIGHT_ATTENUATION(input); 85 | 86 | // composite all lighting together 87 | //float3 lighting = light; 88 | 89 | // multiply albedo and lighting 90 | float3 rgb = albedo.rgb * lightDot; 91 | //rgb += ShadeSH9(half4(input.normal,1)); 92 | return float4(rgb, 1.0); 93 | } 94 | 95 | ENDCG 96 | } 97 | 98 | // Shadow pass 99 | Pass 100 | { 101 | Tags 102 | { 103 | "LightMode" = "ShadowCaster" 104 | } 105 | 106 | CGPROGRAM 107 | #pragma vertex vert 108 | #pragma fragment frag 109 | #pragma multi_compile_shadowcaster 110 | #include "UnityCG.cginc" 111 | 112 | struct v2f { 113 | V2F_SHADOW_CASTER; 114 | }; 115 | 116 | v2f vert(appdata_base v) 117 | { 118 | v2f o; 119 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 120 | return o; 121 | } 122 | 123 | float4 frag(v2f i) : SV_Target 124 | { 125 | SHADOW_CASTER_FRAGMENT(i) 126 | } 127 | ENDCG 128 | } 129 | } 130 | Fallback "Diffuse" 131 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/diffuseSimpleShadow.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ebbd010b962ed9489d3fc95bfbd0420 3 | timeCreated: 1517716784 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/dissolve.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Dissolve" 2 | { 3 | Properties 4 | { 5 | _Color("Color", Color) = (1, 1, 1, 1) 6 | _NoiseTex("Noise Texture", 2D) = "white" {} 7 | _DissolveSpeed("Dissolve Speed", float) = 1.0 8 | _DissolveColor1("Dissolve Color 1", Color) = (1, 1, 1, 1) 9 | _DissolveColor2("Dissolve Color 2", Color) = (1, 1, 1, 1) 10 | _ColorThreshold1("Color Threshold 1", float) = 1.0 11 | _ColorThreshold2("Color Threshold 2", float) = 1.0 12 | _StartTime("Start Time", float) = 1.0 13 | } 14 | 15 | SubShader 16 | { 17 | Tags 18 | { 19 | "Queue" = "Transparent" 20 | } 21 | 22 | Pass 23 | { 24 | Blend SrcAlpha OneMinusSrcAlpha 25 | Cull Off 26 | 27 | CGPROGRAM 28 | 29 | #pragma vertex vert 30 | #pragma fragment frag 31 | 32 | // Properties 33 | float4 _Color; 34 | float4 _DissolveColor1; 35 | float4 _DissolveColor2; 36 | sampler2D _NoiseTex; 37 | float _DissolveSpeed; 38 | float _ColorThreshold1; 39 | float _ColorThreshold2; 40 | float _StartTime; 41 | 42 | struct vertexInput 43 | { 44 | float4 vertex : POSITION; 45 | float4 texCoord : TEXCOORD1; 46 | }; 47 | 48 | struct vertexOutput 49 | { 50 | float4 pos : SV_POSITION; 51 | float4 texCoord : TEXCOORD0; 52 | }; 53 | 54 | vertexOutput vert(vertexInput input) 55 | { 56 | vertexOutput output; 57 | 58 | // convert to world space 59 | output.pos = UnityObjectToClipPos(input.vertex); 60 | 61 | // texture coordinates 62 | output.texCoord = input.texCoord; 63 | 64 | return output; 65 | } 66 | 67 | float4 frag(vertexOutput input) : COLOR 68 | { 69 | // base color 70 | float4 color = _Color; 71 | 72 | // sample noise texture 73 | float noiseSample = tex2Dlod(_NoiseTex, float4(input.texCoord.xy, 0, 0)); 74 | 75 | // dissolve colors 76 | float thresh2 = _Time * _ColorThreshold2 - _StartTime; 77 | float useDissolve2 = noiseSample - thresh2 < 0; 78 | color = (1-useDissolve2)*color + useDissolve2*_DissolveColor2; 79 | 80 | float thresh1 = _Time * _ColorThreshold1 - _StartTime; 81 | float useDissolve1 = noiseSample - thresh1 < 0; 82 | color = (1-useDissolve1)*color + useDissolve1*_DissolveColor1; 83 | 84 | float threshold = _Time * _DissolveSpeed - _StartTime; 85 | clip(noiseSample - threshold); 86 | 87 | return color; 88 | } 89 | 90 | ENDCG 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/dissolve.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d01b85e01a47e243a4c8ce2e54d18b7 3 | timeCreated: 1513449616 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/distort.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Distort" 2 | { 3 | Properties 4 | { 5 | _Noise("Noise", 2D) = "white" {} 6 | _StrengthFilter("Strength Filter", 2D) = "white" {} 7 | _Strength("Distort Strength", float) = 1.0 8 | _Speed("Distort Speed", float) = 1.0 9 | } 10 | 11 | SubShader 12 | { 13 | Tags 14 | { 15 | "Queue" = "Transparent" 16 | "DisableBatching" = "True" 17 | } 18 | 19 | // Grab the screen behind the object into _BackgroundTexture 20 | GrabPass 21 | { 22 | "_BackgroundTexture" 23 | } 24 | 25 | // Render the object with the texture generated above, and invert the colors 26 | Pass 27 | { 28 | ZTest Always 29 | 30 | CGPROGRAM 31 | #pragma vertex vert 32 | #pragma fragment frag 33 | #include "UnityCG.cginc" 34 | 35 | // Properties 36 | sampler2D _Noise; 37 | sampler2D _StrengthFilter; 38 | sampler2D _BackgroundTexture; 39 | float _Strength; 40 | float _Speed; 41 | 42 | struct vertexInput 43 | { 44 | float4 vertex : POSITION; 45 | float3 texCoord : TEXCOORD0; 46 | }; 47 | 48 | struct vertexOutput 49 | { 50 | float4 pos : SV_POSITION; 51 | float4 grabPos : TEXCOORD0; 52 | }; 53 | 54 | vertexOutput vert(vertexInput input) 55 | { 56 | vertexOutput output; 57 | 58 | // billboard to camera 59 | float4 pos = input.vertex; 60 | pos = mul(UNITY_MATRIX_P, 61 | mul(UNITY_MATRIX_MV, float4(0, 0, 0, 1)) 62 | + float4(pos.x, pos.z, 0, 0)); 63 | output.pos = pos; 64 | 65 | // use ComputeGrabScreenPos function from UnityCG.cginc 66 | // to get the correct texture coordinate 67 | output.grabPos = ComputeGrabScreenPos(output.pos); 68 | 69 | // distort based on noise & strength filter 70 | float noise = tex2Dlod(_Noise, float4(input.texCoord, 0)).rgb; 71 | float3 filt = tex2Dlod(_StrengthFilter, float4(input.texCoord, 0)).rgb; 72 | output.grabPos.x += cos(noise*_Time.x*_Speed) * filt * _Strength; 73 | output.grabPos.y += sin(noise*_Time.x*_Speed) * filt * _Strength; 74 | 75 | return output; 76 | } 77 | 78 | float4 frag(vertexOutput input) : COLOR 79 | { 80 | //return float4(1,1,1,1); // billboard test 81 | return tex2Dproj(_BackgroundTexture, input.grabPos); 82 | } 83 | 84 | ENDCG 85 | } 86 | 87 | } 88 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/galaxyMask.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/GalaxyMask" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _MainColor("Main Color", Color) = (1,1,1,1) 7 | _MaskTex("Mask Texture", 2D) = "white" {} 8 | _MaskReplace("Mask Replace Texture", 2D) = "white" {} 9 | _MaskColor("Mask Color", Color) = (1,1,1,1) 10 | _MaskScale("Mask Scale", vector) = (1,1,1,1) 11 | _Speed("Mask Texture Speed", float) = 1.0 12 | } 13 | 14 | SubShader 15 | { 16 | // Regular color & lighting pass 17 | Pass 18 | { 19 | Tags 20 | { 21 | "LightMode" = "ForwardBase" 22 | } 23 | 24 | CGPROGRAM 25 | #pragma vertex vert 26 | #pragma fragment frag 27 | #pragma multi_compile_fwdbase 28 | #include "AutoLight.cginc" 29 | #include "UnityCG.cginc" 30 | 31 | // Properties 32 | sampler2D _MainTex; 33 | sampler2D _MaskTex; 34 | sampler2D _MaskReplace; 35 | float4 _MaskScale; 36 | float4 _MaskColor; 37 | float4 _MainColor; 38 | float _Speed; 39 | float4 _LightColor0; // provided by Unity 40 | 41 | struct vertexInput 42 | { 43 | float4 vertex : POSITION; 44 | float3 normal : NORMAL; 45 | float3 texCoord : TEXCOORD0; 46 | }; 47 | 48 | struct vertexOutput 49 | { 50 | float4 pos : SV_POSITION; 51 | float3 normal : NORMAL; 52 | float3 texCoord : TEXCOORD0; 53 | LIGHTING_COORDS(1,2) 54 | }; 55 | 56 | vertexOutput vert(vertexInput input) 57 | { 58 | vertexOutput output; 59 | 60 | output.pos = UnityObjectToClipPos(input.vertex); 61 | output.normal = UnityObjectToWorldNormal(input.normal); 62 | 63 | output.texCoord = input.texCoord; 64 | 65 | return output; 66 | } 67 | 68 | float4 frag(vertexOutput input) : COLOR 69 | { 70 | // lighting 71 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 72 | float lightDot = saturate(dot(input.normal, lightDir)); 73 | float3 lighting = lightDot * _LightColor0.rgb; 74 | lighting += ShadeSH9(half4(input.normal,1)); // ambient lighting 75 | 76 | // albedo 77 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 78 | 79 | // mask 80 | float isMask = tex2D(_MaskTex, input.texCoord.xy); // == _MaskColor; 81 | 82 | // screen-space coordinates 83 | float2 screenPos = ComputeScreenPos(input.pos).xy / _ScreenParams.xy; 84 | // convert to texture-space coordinates 85 | float2 maskPos = screenPos * _MaskScale; 86 | // scroll sample position 87 | maskPos += _Time * _Speed; 88 | 89 | // sample galaxy texture 90 | float4 mask = tex2D(_MaskReplace, maskPos); 91 | 92 | albedo = (1-isMask)*(albedo+_MainColor) + isMask*mask; 93 | lighting = (1-isMask)*lighting + isMask*float4(1,1,1,1); 94 | 95 | 96 | // final 97 | float3 rgb = albedo.rgb * lighting; 98 | return float4(rgb, 1.0); 99 | } 100 | 101 | ENDCG 102 | } 103 | } 104 | Fallback "Diffuse" 105 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/galaxyMask.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d57c4b0f901c2454db25cba5f9f25b8e 3 | timeCreated: 1517802084 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/glass.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/glass" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _Color("Color", Color) = (1, 1, 1, 1) 7 | _EdgeColor("Edge Color", Color) = (1, 1, 1, 1) 8 | _EdgeThickness("Silouette Dropoff Rate", float) = 1.0 9 | } 10 | 11 | SubShader 12 | { 13 | Tags 14 | { 15 | "Queue" = "Transparent" 16 | } 17 | 18 | Pass 19 | { 20 | Cull Off 21 | ZWrite Off 22 | Blend SrcAlpha OneMinusSrcAlpha // standard alpha blending 23 | 24 | CGPROGRAM 25 | 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | 29 | // Properties 30 | sampler2D _MainTex; 31 | uniform float4 _Color; 32 | uniform float4 _EdgeColor; 33 | uniform float _EdgeThickness; 34 | 35 | struct vertexInput 36 | { 37 | float4 vertex : POSITION; 38 | float3 normal : NORMAL; 39 | float3 texCoord : TEXCOORD0; 40 | }; 41 | 42 | struct vertexOutput 43 | { 44 | float4 pos : SV_POSITION; 45 | float3 normal : NORMAL; 46 | float3 texCoord : TEXCOORD0; 47 | float3 viewDir : TEXCOORD1; 48 | }; 49 | 50 | vertexOutput vert(vertexInput input) 51 | { 52 | vertexOutput output; 53 | 54 | // convert input to world space 55 | output.pos = UnityObjectToClipPos(input.vertex); 56 | float4 normal4 = float4(input.normal, 0.0); 57 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 58 | output.viewDir = normalize(_WorldSpaceCameraPos - mul(unity_ObjectToWorld, input.vertex).xyz); 59 | 60 | output.texCoord = input.texCoord; 61 | 62 | return output; 63 | } 64 | 65 | float4 frag(vertexOutput input) : COLOR 66 | { 67 | // sample texture for color 68 | float4 texColor = tex2D(_MainTex, input.texCoord.xy); 69 | 70 | // apply silouette equation 71 | // based on how close normal is to being orthogonal to view vector 72 | // dot product is smaller the smaller the angle bw the vectors is 73 | // close to edge = closer to 0 74 | // far from edge = closer to 1 75 | float edgeFactor = abs(dot(input.viewDir, input.normal)); 76 | 77 | // apply edgeFactor to Albedo color & EdgeColor 78 | float oneMinusEdge = 1.0 - edgeFactor; 79 | float3 rgb = (_Color.rgb * edgeFactor) + (_EdgeColor * oneMinusEdge); 80 | rgb = min(float3(1, 1, 1), rgb); // clamp to real color vals 81 | rgb = rgb * texColor.rgb; 82 | 83 | // apply edgeFactor to Albedo transparency & EdgeColor transparency 84 | // close to edge = more opaque EdgeColor & more transparent Albedo 85 | float opacity = min(1.0, _Color.a / edgeFactor); 86 | 87 | // opacity^thickness means the edge color will be near 0 away from the edges 88 | // and escalate quickly in opacity towards the edges 89 | opacity = pow(opacity, _EdgeThickness); 90 | opacity = opacity * texColor.a; 91 | 92 | float4 output = float4(rgb, opacity); 93 | return output; 94 | } 95 | 96 | ENDCG 97 | } 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/glass.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e0e5555c3607d54fa2728f298443673 3 | timeCreated: 1505187200 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/grass.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Grass" 2 | { 3 | Properties 4 | { 5 | _RampTex("Ramp", 2D) = "white" {} 6 | _Color("Color", Color) = (1, 1, 1, 1) 7 | _WaveSpeed("Wave Speed", float) = 1.0 8 | _WaveAmp("Wave Amp", float) = 1.0 9 | _HeightFactor("Height Factor", float) = 1.0 10 | _HeightCutoff("Height Cutoff", float) = 1.2 11 | _WindTex("Wind Texture", 2D) = "white" {} 12 | _WorldSize("World Size", vector) = (1, 1, 1, 1) 13 | _WindSpeed("Wind Speed", vector) = (1, 1, 1, 1) 14 | } 15 | 16 | SubShader 17 | { 18 | Pass 19 | { 20 | Tags 21 | { 22 | "DisableBatching" = "True" 23 | } 24 | 25 | CGPROGRAM 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | #pragma multi_compile_fwdbase // shadows 29 | #include "UnityCG.cginc" 30 | 31 | // Properties 32 | sampler2D _RampTex; 33 | sampler2D _WindTex; 34 | float4 _WindTex_ST; 35 | float4 _Color; 36 | float4 _LightColor0; // provided by Unity 37 | float4 _WorldSize; 38 | float _WaveSpeed; 39 | float _WaveAmp; 40 | float _HeightFactor; 41 | float _HeightCutoff; 42 | float4 _WindSpeed; 43 | 44 | struct vertexInput 45 | { 46 | float4 vertex : POSITION; 47 | float3 normal : NORMAL; 48 | }; 49 | 50 | struct vertexOutput 51 | { 52 | float4 pos : SV_POSITION; 53 | float3 normal : NORMAL; 54 | //float2 sp : TEXCOORD0; // test sample position 55 | }; 56 | 57 | vertexOutput vert(vertexInput input) 58 | { 59 | vertexOutput output; 60 | 61 | // convert input to clip & world space 62 | output.pos = UnityObjectToClipPos(input.vertex); 63 | float4 normal4 = float4(input.normal, 0.0); 64 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 65 | 66 | // get vertex world position 67 | float4 worldPos = mul(input.vertex, unity_ObjectToWorld); 68 | // normalize position based on world size 69 | float2 samplePos = worldPos.xz/_WorldSize.xz; 70 | // scroll sample position based on time 71 | samplePos += _Time.x * _WindSpeed.xy; 72 | // sample wind texture 73 | float windSample = tex2Dlod(_WindTex, float4(samplePos, 0, 0)); 74 | 75 | //output.sp = samplePos; // test sample position 76 | 77 | // 0 animation below _HeightCutoff 78 | float heightFactor = input.vertex.y > _HeightCutoff; 79 | // make animation stronger with height 80 | heightFactor = heightFactor * pow(input.vertex.y, _HeightFactor); 81 | 82 | // apply wave animation 83 | output.pos.z += sin(_WaveSpeed*windSample)*_WaveAmp * heightFactor; 84 | output.pos.x += cos(_WaveSpeed*windSample)*_WaveAmp * heightFactor; 85 | 86 | return output; 87 | } 88 | 89 | float4 frag(vertexOutput input) : COLOR 90 | { 91 | // normalize light dir 92 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 93 | 94 | // apply lighting 95 | float ramp = clamp(dot(input.normal, lightDir), 0.001, 1.0); 96 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 97 | 98 | //return float4(frac(input.sp.x), 0, 0, 1); // test sample position 99 | 100 | float3 rgb = _LightColor0.rgb * lighting * _Color.rgb; 101 | return float4(rgb, 1.0); 102 | } 103 | 104 | ENDCG 105 | } 106 | 107 | } 108 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/grass.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e4c63504ed30a14887dfbb11927e18b 3 | timeCreated: 1513550792 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/ice.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Ice" 2 | { 3 | Properties 4 | { 5 | _RampTex("Ramp", 2D) = "white" {} 6 | _BumpTex("Bump", 2D) = "white" {} 7 | _BumpRamp("Bump Ramp", 2D) = "white" {} 8 | _Color("Color", Color) = (1, 1, 1, 1) 9 | _EdgeThickness("Silouette Dropoff Rate", float) = 1.0 10 | _DistortStrength("Distort Strength", float) = 1.0 11 | } 12 | 13 | SubShader 14 | { 15 | // Grab the screen behind the object into _BackgroundTexture 16 | GrabPass 17 | { 18 | "_BackgroundTexture" 19 | } 20 | 21 | // Background distortion 22 | Pass 23 | { 24 | Tags 25 | { 26 | "Queue" = "Transparent" 27 | } 28 | 29 | CGPROGRAM 30 | #pragma vertex vert 31 | #pragma fragment frag 32 | #include "UnityCG.cginc" 33 | 34 | // Properties 35 | sampler2D _BackgroundTexture; 36 | sampler2D _BumpTex; 37 | float _DistortStrength; 38 | 39 | struct vertexInput 40 | { 41 | float4 vertex : POSITION; 42 | float3 normal : NORMAL; 43 | float3 texCoord : TEXCOORD0; 44 | }; 45 | 46 | struct vertexOutput 47 | { 48 | float4 pos : SV_POSITION; 49 | float4 grabPos : TEXCOORD0; 50 | }; 51 | 52 | vertexOutput vert(vertexInput input) 53 | { 54 | vertexOutput output; 55 | 56 | // convert input to world space 57 | output.pos = UnityObjectToClipPos(input.vertex); 58 | float4 normal4 = float4(input.normal, 0.0); 59 | float3 normal = normalize(mul(normal4, unity_WorldToObject).xyz); 60 | 61 | // use ComputeGrabScreenPos function from UnityCG.cginc 62 | // to get the correct texture coordinate 63 | output.grabPos = ComputeGrabScreenPos(output.pos); 64 | 65 | // distort based on bump map 66 | float3 bump = tex2Dlod(_BumpTex, float4(input.texCoord.xy, 0, 0)).rgb; 67 | output.grabPos.x += bump.x * _DistortStrength; 68 | output.grabPos.y += bump.y * _DistortStrength; 69 | 70 | return output; 71 | } 72 | 73 | float4 frag(vertexOutput input) : COLOR 74 | { 75 | return tex2Dproj(_BackgroundTexture, input.grabPos); 76 | } 77 | ENDCG 78 | } 79 | 80 | // Transparent color & lighting pass 81 | Pass 82 | { 83 | Tags 84 | { 85 | "LightMode" = "ForwardBase" // allows shadow rec/cast 86 | "Queue" = "Transparent" 87 | } 88 | Cull Off 89 | Blend SrcAlpha OneMinusSrcAlpha // standard alpha blending 90 | 91 | CGPROGRAM 92 | #pragma vertex vert 93 | #pragma fragment frag 94 | 95 | // Properties 96 | sampler2D _RampTex; 97 | sampler2D _BumpTex; 98 | sampler2D _BumpRamp; 99 | uniform float4 _Color; 100 | uniform float _EdgeThickness; 101 | sampler2D _BackgroundTexture; 102 | 103 | struct vertexInput 104 | { 105 | float4 vertex : POSITION; 106 | float3 normal : NORMAL; 107 | float3 texCoord : TEXCOORD0; 108 | }; 109 | 110 | struct vertexOutput 111 | { 112 | float4 pos : SV_POSITION; 113 | float3 normal : NORMAL; 114 | float3 texCoord : TEXCOORD0; 115 | float3 viewDir : TEXCOORD1; 116 | }; 117 | 118 | vertexOutput vert(vertexInput input) 119 | { 120 | vertexOutput output; 121 | 122 | // convert input to world space 123 | output.pos = UnityObjectToClipPos(input.vertex); 124 | float4 normal4 = float4(input.normal, 0.0); 125 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 126 | output.viewDir = normalize(_WorldSpaceCameraPos - mul(unity_ObjectToWorld, input.vertex).xyz); 127 | 128 | // texture coordinates 129 | output.texCoord = input.texCoord; 130 | 131 | return output; 132 | } 133 | 134 | float4 frag(vertexOutput input) : COLOR 135 | { 136 | // compute sillouette factor 137 | float edgeFactor = abs(dot(input.viewDir, input.normal)); 138 | float oneMinusEdge = 1.0 - edgeFactor; 139 | // get sillouette color 140 | float3 rgb = tex2D(_RampTex, float2(oneMinusEdge, 0.5)).rgb; 141 | // get sillouette opacity 142 | float opacity = min(1.0, _Color.a / edgeFactor); 143 | opacity = pow(opacity, _EdgeThickness); 144 | 145 | // apply bump map 146 | float3 bump = tex2D(_BumpTex, input.texCoord.xy).rgb + input.normal.xyz; 147 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 148 | float ramp = clamp(dot(bump, lightDir), 0.001, 1.0); 149 | float4 lighting = float4(tex2D(_BumpRamp, float2(ramp, 0.5)).rgb, 1.0); 150 | 151 | return float4(rgb, opacity) * lighting; 152 | } 153 | 154 | ENDCG 155 | } 156 | 157 | // Shadow pass 158 | Pass 159 | { 160 | Tags 161 | { 162 | "LightMode" = "ShadowCaster" 163 | } 164 | 165 | CGPROGRAM 166 | #pragma vertex vert 167 | #pragma fragment frag 168 | #pragma multi_compile_shadowcaster 169 | #include "UnityCG.cginc" 170 | 171 | struct v2f { 172 | V2F_SHADOW_CASTER; 173 | }; 174 | 175 | v2f vert(appdata_base v) 176 | { 177 | v2f o; 178 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 179 | return o; 180 | } 181 | 182 | float4 frag(v2f i) : SV_Target 183 | { 184 | SHADOW_CASTER_FRAGMENT(i) 185 | } 186 | ENDCG 187 | } 188 | } 189 | 190 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/ice.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54deae4feaa895241979f78128bf15cf 3 | timeCreated: 1513464521 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/silouetteBehindStuff.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Silouette Behind Stuff" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _RampTex("Ramp", 2D) = "white" {} 7 | _SilColor("Silouette Color", Color) = (0, 0, 0, 1) 8 | } 9 | 10 | SubShader 11 | { 12 | // Regular color & lighting pass 13 | Pass 14 | { 15 | Tags 16 | { 17 | "LightMode" = "ForwardBase" // allows shadow rec/cast 18 | } 19 | 20 | // Write to Stencil buffer (so that silouette pass can read) 21 | Stencil 22 | { 23 | Ref 4 24 | Comp always 25 | Pass replace 26 | ZFail keep 27 | } 28 | 29 | CGPROGRAM 30 | #pragma vertex vert 31 | #pragma fragment frag 32 | #pragma multi_compile_fwdbase // shadows 33 | #include "AutoLight.cginc" 34 | #include "UnityCG.cginc" 35 | 36 | // Properties 37 | sampler2D _MainTex; 38 | sampler2D _RampTex; 39 | float4 _LightColor0; // provided by Unity 40 | 41 | struct vertexInput 42 | { 43 | float4 vertex : POSITION; 44 | float3 normal : NORMAL; 45 | float3 texCoord : TEXCOORD0; 46 | }; 47 | 48 | struct vertexOutput 49 | { 50 | float4 pos : SV_POSITION; 51 | float3 normal : NORMAL; 52 | float3 texCoord : TEXCOORD0; 53 | LIGHTING_COORDS(1,2) // shadows 54 | }; 55 | 56 | vertexOutput vert(vertexInput input) 57 | { 58 | vertexOutput output; 59 | 60 | // convert input to world space 61 | output.pos = UnityObjectToClipPos(input.vertex); 62 | float4 normal4 = float4(input.normal, 0.0); // need float4 to mult with 4x4 matrix 63 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 64 | 65 | output.texCoord = input.texCoord; 66 | 67 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 68 | return output; 69 | } 70 | 71 | float4 frag(vertexOutput input) : COLOR 72 | { 73 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 74 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 75 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 76 | 77 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 78 | 79 | float attenuation = LIGHT_ATTENUATION(input); // shadow value 80 | float3 rgb = albedo.rgb * _LightColor0.rgb * lighting * attenuation; 81 | return float4(rgb, 1.0); 82 | } 83 | 84 | ENDCG 85 | } 86 | 87 | // Shadow pass 88 | Pass 89 | { 90 | Tags 91 | { 92 | "LightMode" = "ShadowCaster" 93 | } 94 | 95 | CGPROGRAM 96 | #pragma vertex vert 97 | #pragma fragment frag 98 | #pragma multi_compile_shadowcaster 99 | #include "UnityCG.cginc" 100 | 101 | struct v2f { 102 | V2F_SHADOW_CASTER; 103 | }; 104 | 105 | v2f vert(appdata_base v) 106 | { 107 | v2f o; 108 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 109 | return o; 110 | } 111 | 112 | float4 frag(v2f i) : SV_Target 113 | { 114 | SHADOW_CASTER_FRAGMENT(i) 115 | } 116 | ENDCG 117 | } 118 | 119 | // Silouette pass 1 (backfaces) 120 | Pass 121 | { 122 | Tags 123 | { 124 | "Queue" = "Transparent" 125 | } 126 | // Won't draw where it sees ref value 4 127 | Cull Front // draw back faces 128 | ZWrite OFF 129 | ZTest Always 130 | Stencil 131 | { 132 | Ref 3 133 | Comp Greater 134 | Fail keep 135 | Pass replace 136 | } 137 | Blend SrcAlpha OneMinusSrcAlpha 138 | 139 | CGPROGRAM 140 | #pragma vertex vert 141 | #pragma fragment frag 142 | 143 | // Properties 144 | uniform float4 _SilColor; 145 | 146 | struct vertexInput 147 | { 148 | float4 vertex : POSITION; 149 | }; 150 | 151 | struct vertexOutput 152 | { 153 | float4 pos : SV_POSITION; 154 | }; 155 | 156 | vertexOutput vert(vertexInput input) 157 | { 158 | vertexOutput output; 159 | output.pos = UnityObjectToClipPos(input.vertex); 160 | return output; 161 | } 162 | 163 | float4 frag(vertexOutput input) : COLOR 164 | { 165 | return _SilColor; 166 | } 167 | 168 | ENDCG 169 | } 170 | 171 | // Silouette pass 2 (front faces) 172 | Pass 173 | { 174 | Tags 175 | { 176 | "Queue" = "Transparent" 177 | } 178 | // Won't draw where it sees ref value 4 179 | Cull Back // draw front faces 180 | ZWrite OFF 181 | ZTest Always 182 | Stencil 183 | { 184 | Ref 4 185 | Comp NotEqual 186 | Pass keep 187 | } 188 | Blend SrcAlpha OneMinusSrcAlpha 189 | 190 | CGPROGRAM 191 | #pragma vertex vert 192 | #pragma fragment frag 193 | 194 | // Properties 195 | uniform float4 _SilColor; 196 | 197 | struct vertexInput 198 | { 199 | float4 vertex : POSITION; 200 | }; 201 | 202 | struct vertexOutput 203 | { 204 | float4 pos : SV_POSITION; 205 | }; 206 | 207 | vertexOutput vert(vertexInput input) 208 | { 209 | vertexOutput output; 210 | output.pos = UnityObjectToClipPos(input.vertex); 211 | return output; 212 | } 213 | 214 | float4 frag(vertexOutput input) : COLOR 215 | { 216 | return _SilColor; 217 | } 218 | 219 | ENDCG 220 | } 221 | } 222 | } -------------------------------------------------------------------------------- /Assets/Materials/Shaders/snow.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Snow" 2 | { 3 | Properties 4 | { 5 | _RampTex("Ramp Texture", 2D) = "white" {} 6 | _BumpTex("Bump Texture", 2D) = "white" {} 7 | _BumpRamp("Bump Ramp Texture", 2D) = "white" {} 8 | _Color("Color", Color) = (1, 1, 1, 1) 9 | _SnowLevel("Snow Level", float) = 1.0 10 | } 11 | 12 | SubShader 13 | { 14 | // Color, lighting, shape pass 15 | Pass 16 | { 17 | Tags 18 | { 19 | "LightMode" = "ForwardBase" // allows shadow rec/cast 20 | } 21 | 22 | CGPROGRAM 23 | #pragma vertex vert 24 | #pragma fragment frag 25 | #include "AutoLight.cginc" 26 | #include "UnityCG.cginc" 27 | 28 | // Properties 29 | sampler2D _RampTex; 30 | sampler2D _BumpTex; 31 | sampler2D _BumpRamp; 32 | float4 _Color; 33 | float _SnowLevel; 34 | 35 | struct vertexInput 36 | { 37 | float4 vertex : POSITION; 38 | float3 normal : NORMAL; 39 | float3 texCoord : TEXCOORD0; 40 | }; 41 | 42 | struct vertexOutput 43 | { 44 | float4 pos : SV_POSITION; 45 | float3 normal : NORMAL; 46 | float3 texCoord : TEXCOORD0; 47 | LIGHTING_COORDS(2,3) // shadows 48 | }; 49 | 50 | vertexOutput vert(vertexInput input) 51 | { 52 | vertexOutput output; 53 | 54 | // convert input to world space 55 | output.pos = UnityObjectToClipPos(input.vertex); 56 | float4 normal4 = float4(input.normal, 0.0); 57 | output.normal = normalize(mul(normal4, unity_WorldToObject).xyz); 58 | 59 | // texture coordinates 60 | output.texCoord = input.texCoord; 61 | 62 | TRANSFER_VERTEX_TO_FRAGMENT(output); // shadows 63 | return output; 64 | } 65 | 66 | float4 frag(vertexOutput input) : COLOR 67 | { 68 | // normalize light dir 69 | float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); 70 | 71 | // apply regular lighting 72 | float ramp = clamp(dot(input.normal, lightDir), 0, 1.0); 73 | float3 lighting = tex2D(_RampTex, float2(ramp, 0.5)).rgb; 74 | 75 | // apply bump map lighting 76 | float3 bump = tex2D(_BumpTex, input.texCoord.xy).rgb + input.normal.xyz; 77 | float bRamp = clamp(dot(bump, lightDir), 0.001, 1.0); 78 | float3 bLighting = tex2D(_BumpRamp, float2(bRamp, 0.5)).rgb; 79 | 80 | // shadows 81 | float attenuation = LIGHT_ATTENUATION(input); 82 | 83 | return _Color * float4(lighting, 1.0) * float4(bLighting, 1.0) * attenuation; 84 | } 85 | 86 | ENDCG 87 | } 88 | 89 | // Shadow pass 90 | Pass 91 | { 92 | Tags 93 | { 94 | "LightMode" = "ShadowCaster" 95 | } 96 | 97 | CGPROGRAM 98 | #pragma vertex vert 99 | #pragma fragment frag 100 | #pragma multi_compile_shadowcaster 101 | #include "UnityCG.cginc" 102 | 103 | struct v2f { 104 | V2F_SHADOW_CASTER; 105 | }; 106 | 107 | v2f vert(appdata_base v) 108 | { 109 | v2f o; 110 | TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) 111 | return o; 112 | } 113 | 114 | float4 frag(v2f i) : SV_Target 115 | { 116 | SHADOW_CASTER_FRAGMENT(i) 117 | } 118 | ENDCG 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/snow.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c1879ff39b9c68499a78f8244e4a6a3 3 | timeCreated: 1513538069 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/water.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Water" 2 | { 3 | Properties 4 | { 5 | _Color("Color", Color) = (1, 1, 1, 1) 6 | _EdgeColor("Edge Color", Color) = (1, 1, 1, 1) 7 | _DepthFactor("Depth Factor", float) = 1.0 8 | _WaveSpeed("Wave Speed", float) = 1.0 9 | _WaveAmp("Wave Amp", float) = 0.2 10 | _DepthRampTex("Depth Ramp", 2D) = "white" {} 11 | _NoiseTex("Noise Texture", 2D) = "white" {} 12 | _MainTex("Main Texture", 2D) = "white" {} 13 | _DistortStrength("Distort Strength", float) = 1.0 14 | _ExtraHeight("Extra Height", float) = 0.0 15 | } 16 | 17 | SubShader 18 | { 19 | Tags 20 | { 21 | "Queue" = "Transparent" 22 | } 23 | 24 | // Grab the screen behind the object into _BackgroundTexture 25 | GrabPass 26 | { 27 | "_BackgroundTexture" 28 | } 29 | 30 | // Background distortion 31 | Pass 32 | { 33 | 34 | CGPROGRAM 35 | #pragma vertex vert 36 | #pragma fragment frag 37 | #include "UnityCG.cginc" 38 | 39 | // Properties 40 | sampler2D _BackgroundTexture; 41 | sampler2D _NoiseTex; 42 | float _DistortStrength; 43 | float _WaveSpeed; 44 | float _WaveAmp; 45 | 46 | struct vertexInput 47 | { 48 | float4 vertex : POSITION; 49 | float3 normal : NORMAL; 50 | float3 texCoord : TEXCOORD0; 51 | }; 52 | 53 | struct vertexOutput 54 | { 55 | float4 pos : SV_POSITION; 56 | float4 grabPos : TEXCOORD0; 57 | }; 58 | 59 | vertexOutput vert(vertexInput input) 60 | { 61 | vertexOutput output; 62 | 63 | // convert input to world space 64 | output.pos = UnityObjectToClipPos(input.vertex); 65 | float4 normal4 = float4(input.normal, 0.0); 66 | float3 normal = normalize(mul(normal4, unity_WorldToObject).xyz); 67 | 68 | // use ComputeGrabScreenPos function from UnityCG.cginc 69 | // to get the correct texture coordinate 70 | output.grabPos = ComputeGrabScreenPos(output.pos); 71 | 72 | // distort based on bump map 73 | float noiseSample = tex2Dlod(_NoiseTex, float4(input.texCoord.xy, 0, 0)); 74 | output.grabPos.y += sin(_Time*_WaveSpeed*noiseSample)*_WaveAmp * _DistortStrength; 75 | output.grabPos.x += cos(_Time*_WaveSpeed*noiseSample)*_WaveAmp * _DistortStrength; 76 | 77 | return output; 78 | } 79 | 80 | float4 frag(vertexOutput input) : COLOR 81 | { 82 | return tex2Dproj(_BackgroundTexture, input.grabPos); 83 | } 84 | ENDCG 85 | } 86 | 87 | Pass 88 | { 89 | Blend SrcAlpha OneMinusSrcAlpha 90 | 91 | CGPROGRAM 92 | #include "UnityCG.cginc" 93 | 94 | #pragma vertex vert 95 | #pragma fragment frag 96 | 97 | // Properties 98 | float4 _Color; 99 | float4 _EdgeColor; 100 | float _DepthFactor; 101 | float _WaveSpeed; 102 | float _WaveAmp; 103 | float _ExtraHeight; 104 | sampler2D _CameraDepthTexture; 105 | sampler2D _DepthRampTex; 106 | sampler2D _NoiseTex; 107 | sampler2D _MainTex; 108 | 109 | struct vertexInput 110 | { 111 | float4 vertex : POSITION; 112 | float4 texCoord : TEXCOORD1; 113 | }; 114 | 115 | struct vertexOutput 116 | { 117 | float4 pos : SV_POSITION; 118 | float4 texCoord : TEXCOORD0; 119 | float4 screenPos : TEXCOORD1; 120 | }; 121 | 122 | vertexOutput vert(vertexInput input) 123 | { 124 | vertexOutput output; 125 | 126 | // convert to world space 127 | output.pos = UnityObjectToClipPos(input.vertex); 128 | 129 | // apply wave animation 130 | float noiseSample = tex2Dlod(_NoiseTex, float4(input.texCoord.xy, 0, 0)); 131 | output.pos.y += sin(_Time*_WaveSpeed*noiseSample)*_WaveAmp + _ExtraHeight; 132 | output.pos.x += cos(_Time*_WaveSpeed*noiseSample)*_WaveAmp; 133 | 134 | // compute depth 135 | output.screenPos = ComputeScreenPos(output.pos); 136 | 137 | // texture coordinates 138 | output.texCoord = input.texCoord; 139 | 140 | return output; 141 | } 142 | 143 | float4 frag(vertexOutput input) : COLOR 144 | { 145 | // apply depth texture 146 | float4 depthSample = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, input.screenPos); 147 | float depth = LinearEyeDepth(depthSample).r; 148 | 149 | // create foamline 150 | float foamLine = 1 - saturate(_DepthFactor * (depth - input.screenPos.w)); 151 | float4 foamRamp = float4(tex2D(_DepthRampTex, float2(foamLine, 0.5)).rgb, 1.0); 152 | 153 | // sample main texture 154 | float4 albedo = tex2D(_MainTex, input.texCoord.xy); 155 | 156 | float4 col = _Color * foamRamp * albedo; 157 | return col; 158 | } 159 | 160 | ENDCG 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/water.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e2d57f0e606d8c4fa4f7a30f625234c 3 | timeCreated: 1513242087 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/waterWaves.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/WaterWaves" 2 | { 3 | Properties 4 | { 5 | _Color("Color", Color) = (1, 1, 1, 1) 6 | _Res("Res", float) = 10 7 | } 8 | 9 | CGINCLUDE 10 | float random (float2 st) 11 | { 12 | return frac( sin(dot(st, float2(12.9898,78.233))) * 43758.5453123 ); 13 | } 14 | 15 | float noise (float2 st) 16 | { 17 | float2 i = floor(st); 18 | float2 f = frac(st); 19 | 20 | // Four corners in 2D of a tile 21 | float a = random(i); 22 | float b = random(i + float2(1.0, 0.0)); 23 | float c = random(i + float2(0.0, 1.0)); 24 | float d = random(i + float2(1.0, 1.0)); 25 | 26 | float2 u = f * f * (3.0 - 2.0 * f); 27 | 28 | return lerp(a, b, u.x) + 29 | (c - a) * u.y * (1.0 - u.x) + 30 | (d - b) * u.x * u.y; 31 | } 32 | 33 | float fbm (float2 st) { 34 | // Initial values 35 | float value = 0.0; 36 | float amplitude = 0.5; 37 | float frequency = 0.0; 38 | 39 | // Loop of octaves 40 | for (int i = 0; i < 6; i++) { 41 | value += amplitude * abs(noise(st)); 42 | st *= 2.0; 43 | amplitude *= 0.5; 44 | } 45 | value = abs(1 - value); 46 | value *= value; 47 | return value; 48 | } 49 | ENDCG 50 | 51 | SubShader 52 | { 53 | Tags 54 | { 55 | "Queue" = "Transparent" 56 | } 57 | 58 | Pass 59 | { 60 | Blend SrcAlpha OneMinusSrcAlpha 61 | 62 | CGPROGRAM 63 | #include "UnityCG.cginc" 64 | 65 | #pragma vertex vert 66 | #pragma fragment frag 67 | 68 | // Properties 69 | float4 _Color; 70 | float _Res; 71 | 72 | struct vertexInput 73 | { 74 | float4 vertex : POSITION; 75 | }; 76 | 77 | struct vertexOutput 78 | { 79 | float4 pos : SV_POSITION; 80 | }; 81 | 82 | vertexOutput vert(vertexInput input) 83 | { 84 | vertexOutput output; 85 | output.pos = UnityObjectToClipPos(input.vertex); 86 | return output; 87 | } 88 | 89 | float4 frag(vertexOutput input) : COLOR 90 | { 91 | float2 st = input.pos.xy / float2(_Res, _Res); 92 | //_Res *= _Res / _Res; 93 | float val = fbm(st * 3.0); 94 | 95 | float4 col = _Color + float4(val, val, val, 0.0); 96 | return col; 97 | } 98 | 99 | ENDCG 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/waterWaves.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bec4f65aa11f2943b461a16fa4ebee8 3 | timeCreated: 1513264595 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/Shaders/window.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Window" 2 | { 3 | Properties 4 | { 5 | _ClearColor ("Clear Color", Color) = (1,1,1,1) 6 | _FogColor ("Fog Color", Color) = (1,1,1,1) 7 | _BlurRadius ("Blur Radius", float) = 3 8 | _MaxAge("Max Age", float) = 3 9 | } 10 | 11 | SubShader 12 | { 13 | Tags 14 | { 15 | "Queue" = "Transparent" 16 | } 17 | 18 | // Grab the screen behind the object into _BGTex 19 | GrabPass 20 | { 21 | "_BGTex" 22 | } 23 | 24 | Pass 25 | { 26 | CGPROGRAM 27 | #pragma vertex vert 28 | #pragma fragment frag 29 | #include "UnityCG.cginc" 30 | #include "blur.cginc" 31 | 32 | // Properties 33 | // set in material 34 | uniform float4 _ClearColor; 35 | uniform float4 _FogColor; 36 | uniform float _BlurRadius; 37 | uniform float _MaxAge; 38 | // grab pass 39 | uniform sampler2D _BGTex; 40 | uniform float4 _BGTex_TexelSize; 41 | // set by script 42 | uniform sampler2D _MouseMap; 43 | uniform float _MaxSeconds; 44 | 45 | struct vertexInput 46 | { 47 | float4 vertex : POSITION; 48 | float3 texCoord : TEXCOORD0; 49 | }; 50 | 51 | struct vertexOutput 52 | { 53 | float4 pos : SV_POSITION; 54 | float3 texCoord : TEXCOORD0; 55 | float4 grabPos : TEXCOORD1; 56 | }; 57 | 58 | vertexOutput vert(vertexInput input) 59 | { 60 | vertexOutput output; 61 | output.pos = UnityObjectToClipPos(input.vertex); 62 | output.grabPos = ComputeGrabScreenPos(output.pos); 63 | output.texCoord = input.texCoord; 64 | return output; 65 | } 66 | 67 | float4 frag(vertexOutput input) : COLOR 68 | { 69 | float4 bg = tex2Dproj(_BGTex, input.grabPos); 70 | // younger = redder 71 | float timeDrawn = tex2D(_MouseMap, input.texCoord.xy).r; 72 | float age = clamp(_Time.y - timeDrawn, 0.0001, _Time.y); 73 | float percentMaxAge = saturate(age / _MaxAge); 74 | //return float4(percentMaxAge, 0, 0, 1); 75 | 76 | // older = higher percentMaxAge = more blur 77 | float blurRadius = _BlurRadius * percentMaxAge; 78 | float4 color = (1-percentMaxAge)*_ClearColor + percentMaxAge*_FogColor; 79 | 80 | float4 blurX = gaussianBlur(float2(1,0), input.grabPos, _BGTex_TexelSize.z, _BGTex, blurRadius); 81 | float4 blurY = gaussianBlur(float2(0,1), input.grabPos, _BGTex_TexelSize.w, _BGTex, blurRadius); 82 | return (blurX + blurY) * color; 83 | 84 | // TEST 85 | //float blurRadius = floor(_BlurRadius * mouseSample.r); 86 | //return mouseSample; // test mouse map 87 | //float noSmudge = mouseSample.r != 0; // test erasing blur 88 | } 89 | 90 | ENDCG 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/ProcGeo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class ProcGeo : MonoBehaviour { 5 | 6 | public MeshFilter meshFilter; 7 | public float width = 1.0f; 8 | public float length = 1.0f; 9 | public float w = 1.0f; 10 | 11 | void Start () { 12 | 13 | // create a new mesh & assign it to our MeshFilter 14 | Mesh mesh = new Mesh(); 15 | meshFilter.mesh = mesh; 16 | 17 | // create a new list of vertices 18 | Vector3[] vertices = new Vector3[4]; 19 | 20 | vertices[0] = new Vector3(0, 0, 0); 21 | vertices[1] = new Vector3(width, 0, 0); 22 | vertices[2] = new Vector3(0, 0, length); 23 | vertices[3] = new Vector3(width, 0, length); 24 | 25 | mesh.vertices = vertices; 26 | 27 | // create a new list of triangles 28 | int[] tris = new int[6]; 29 | 30 | tris[0] = 0; 31 | tris[1] = 2; 32 | tris[2] = 1; 33 | 34 | tris[3] = 2; 35 | tris[4] = 3; 36 | tris[5] = 1; 37 | 38 | mesh.triangles = tris; 39 | 40 | // let Unity do the work for normals for now- we'll recalculate later! 41 | mesh.RecalculateNormals(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/Scripts/BloomLin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f43854370d3d05545ac003cd0ac7c25e 3 | timeCreated: 1520415121 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/DepthTexture.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [ExecuteInEditMode] 4 | public class DepthTexture : MonoBehaviour { 5 | 6 | private Camera cam; 7 | 8 | void Start () { 9 | cam = GetComponent(); 10 | cam.depthTextureMode = DepthTextureMode.Depth; 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Scripts/DepthTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac3dde604aaa6b04caf2d67ab2b88899 3 | timeCreated: 1513254533 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/DrawOnTexture.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DrawOnTexture : MonoBehaviour { 6 | 7 | public Camera cam; 8 | public Color drawColor; 9 | public Renderer destinationRenderer; 10 | public int TextureSize; 11 | public int Radius; 12 | public Color BlurColor; 13 | 14 | private Texture2D texture; 15 | 16 | void Start () 17 | { 18 | texture = new Texture2D(TextureSize, TextureSize, TextureFormat.RFloat, false, true); 19 | for (int i = 0; i < texture.height; i++) 20 | { 21 | for (int j = 0; j < texture.width; j++) 22 | { 23 | texture.SetPixel(i, j, BlurColor); 24 | } 25 | } 26 | texture.Apply(); 27 | destinationRenderer.material.SetTexture("_MouseMap", texture); 28 | } 29 | 30 | void OnMouseDrag () 31 | { 32 | Ray ray = cam.ScreenPointToRay(Input.mousePosition); 33 | RaycastHit hit; 34 | 35 | if(Physics.Raycast(ray, out hit, 100)) 36 | { 37 | // younger = redder (higher r) 38 | // older = blacker 39 | //Debug.Log("Time: " + Time.timeSinceLevelLoad + "; r: " + r); 40 | Color color = new Color(Time.timeSinceLevelLoad, 0, 0, 1); 41 | //Debug.Log("r: " + color.r); 42 | //Color color = new Color(1, 0, 0, 1); 43 | 44 | int x = (int)(hit.textureCoord.x*texture.width); 45 | int y = (int)(hit.textureCoord.y*texture.height); 46 | 47 | texture.SetPixel(x, y, color); 48 | 49 | for (int i = 0; i < texture.height; i++) 50 | { 51 | for (int j = 0; j < texture.width; j++) 52 | { 53 | float dist = Vector2.Distance(new Vector2(i,j), new Vector2(x,y)); 54 | if(dist <= Radius) 55 | texture.SetPixel(i, j, color); 56 | } 57 | } 58 | 59 | texture.Apply(); 60 | destinationRenderer.material.SetTexture("_MouseMap", texture); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Assets/Scripts/HeatmapCam.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b6189727cf1c3d4384e7be5d7e6f40c 3 | timeCreated: 1520119350 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/PostProcess.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7815becb176a4c949bae5b53b53e1fcb 3 | timeCreated: 1515386155 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcGeo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 144c04e2e3352a14098572553193af52 3 | timeCreated: 1516476676 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcGeoCube.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class ProcGeoCube : MonoBehaviour { 5 | 6 | public MeshFilter meshFilter; 7 | 8 | void Start () { 9 | CreateBox(); 10 | } 11 | 12 | void CreateBox() 13 | { 14 | // create a new mesh & assign it to our MeshFilter 15 | Mesh mesh = new Mesh(); 16 | meshFilter.mesh = mesh; 17 | 18 | // create shape builder 19 | Shape shape = new Shape(32, 36); 20 | 21 | // quads 22 | // top 23 | shape.CreateQuad(new Vector3(-2, 0, 0), new Vector3(0, 0, 2), new Vector3(0, 0, 0)); 24 | // bottom 25 | shape.CreateQuad(new Vector3(2, 0, 0), new Vector3(0, 0, 2), new Vector3(-2, -2, 0)); 26 | // sides 27 | shape.CreateQuad(new Vector3(0, -2, 0), new Vector3(-2, 0, 0), new Vector3(0, 0, 0)); 28 | shape.CreateQuad(new Vector3(0, -2, 0), new Vector3(0, 0, 2), new Vector3(-2, 0, 0)); 29 | shape.CreateQuad(new Vector3(0, -2, 0), new Vector3(0, 0, -2), new Vector3(0, 0, 2)); 30 | shape.CreateQuad(new Vector3(0, -2, 0), new Vector3(2, 0, 0), new Vector3(-2, 0, 2)); 31 | 32 | mesh.vertices = shape.vertices; 33 | mesh.triangles = shape.triangles; 34 | mesh.uv = shape.uv; 35 | mesh.normals = shape.normals; 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /Assets/Scripts/ProcGeoCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a20f16b153944c4888afe881eb3c854 3 | timeCreated: 1519436783 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/RecalcBounds.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class RecalcBounds : MonoBehaviour { 4 | 5 | void Start() { 6 | // boundsTarget is the center of the camera's frustum, in world coordinates: 7 | Camera cam = Camera.main; 8 | Vector3 camPosition = cam.transform.position; 9 | Vector3 normCamForward = Vector3.Normalize(cam.transform.forward); 10 | float boundsDistance = (cam.farClipPlane - cam.nearClipPlane) / 2 + cam.nearClipPlane; 11 | Vector3 boundsTarget = camPosition + (normCamForward * boundsDistance); 12 | 13 | // The game object's transform will be applied to the mesh's bounds for frustum culling checking. 14 | // We need to "undo" this transform by making the boundsTarget relative to the game object's transform: 15 | Vector3 realtiveBoundsTarget = this.transform.InverseTransformPoint(boundsTarget); 16 | 17 | // Set the bounds of the mesh to be a 1x1x1 cube (actually doesn't matter what the size is) 18 | Mesh mesh = GetComponent().mesh; 19 | mesh.bounds = new Bounds(realtiveBoundsTarget, Vector3.one); 20 | } 21 | } -------------------------------------------------------------------------------- /Assets/Scripts/RecalcBounds.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1f9f5f34056e9a4ab291a6ff902c742 3 | timeCreated: 1515222530 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/Rotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a0e416ba7e08e64888aea8c75444cfb 3 | timeCreated: 1513343880 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 719c2b8a364b2234f8cbc17b7e01ee35 3 | folderAsset: yes 4 | timeCreated: 1499470969 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Shape.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class Shape { 5 | 6 | public Vector3[] vertices; 7 | public int[] triangles; 8 | public Vector2[] uv; 9 | public Vector3[] normals; 10 | int triOffset = 0; 11 | int vertexOffset = 0; 12 | 13 | public Shape (int numVerts, int numTris) 14 | { 15 | vertices = new Vector3[numVerts]; 16 | triangles = new int[numTris]; 17 | uv = new Vector2[numVerts]; 18 | normals = new Vector3[numVerts]; 19 | } 20 | 21 | public void CreateQuad (Vector3 widthDir, Vector3 lengthDir, Vector3 pos) 22 | { 23 | // vertex indices 24 | int i1 = vertexOffset; 25 | int i2 = vertexOffset + 1; 26 | int i3 = vertexOffset + 2; 27 | int i4 = vertexOffset + 3; 28 | 29 | // vertices 30 | vertices[i1] = pos; 31 | vertices[i2] = pos + widthDir; 32 | vertices[i3] = pos + widthDir + lengthDir; 33 | vertices[i4] = pos + lengthDir; 34 | 35 | vertexOffset += 4; 36 | 37 | // triangles 38 | triangles[triOffset] = i1; 39 | triangles[triOffset + 1] = i2; 40 | triangles[triOffset + 2] = i3; 41 | 42 | triangles[triOffset + 3] = i1; 43 | triangles[triOffset + 4] = i3; 44 | triangles[triOffset + 5] = i4; 45 | 46 | triOffset += 6; 47 | 48 | // normals 49 | Vector3 normal = GetSurfaceNormal(vertices[i1], vertices[i2], vertices[i3]); 50 | normals[i1] = normal; 51 | normals[i2] = normal; 52 | normals[i3] = normal; 53 | normals[i4] = normal; 54 | 55 | // UVs 56 | uv[i1] = new Vector2(0, 1); // 0 57 | uv[i2] = new Vector2(1, 1); // 1 58 | uv[i3] = new Vector2(1, 0); // 2 59 | uv[i4] = new Vector2(0, 0); // 3 60 | } 61 | 62 | Vector3 GetSurfaceNormal (Vector3 v1, Vector3 v2, Vector3 v3) { 63 | // get edge directions 64 |   Vector3 edge1 = v2 - v1; 65 |   Vector3 edge2 = v3 - v2; 66 | // get normalized cross product 67 | Vector3 normal = Vector3.Cross(edge1, edge2).normalized; 68 | return normal; 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /Assets/Scripts/Shape.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 019719bf8a2c7174bab232d57180757f 3 | timeCreated: 1519436783 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 3 | 4 | Section 1 – Definitions. 5 | 6 | Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 7 | Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 8 | BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. 9 | Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 10 | Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 11 | Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 12 | License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. 13 | Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 14 | Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 15 | Licensor means the individual(s) or entity(ies) granting rights under this Public License. 16 | NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. 17 | Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 18 | Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 19 | You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 20 | Section 2 – Scope. 21 | 22 | License grant. 23 | Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 24 | reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and 25 | produce, reproduce, and Share Adapted Material for NonCommercial purposes only. 26 | Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 27 | Term. The term of this Public License is specified in Section 6(a). 28 | Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 29 | Downstream recipients. 30 | Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 31 | Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. 32 | No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 33 | No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 34 | Other rights. 35 | 36 | Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 37 | Patent and trademark rights are not licensed under this Public License. 38 | To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. 39 | Section 3 – License Conditions. 40 | 41 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 42 | 43 | Attribution. 44 | 45 | If You Share the Licensed Material (including in modified form), You must: 46 | 47 | retain the following if it is supplied by the Licensor with the Licensed Material: 48 | identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 49 | a copyright notice; 50 | a notice that refers to this Public License; 51 | a notice that refers to the disclaimer of warranties; 52 | a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 53 | indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 54 | indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 55 | You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 56 | If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 57 | ShareAlike. 58 | In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 59 | 60 | The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. 61 | You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 62 | You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. 63 | Section 4 – Sui Generis Database Rights. 64 | 65 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 66 | 67 | for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; 68 | if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and 69 | You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 70 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 71 | Section 5 – Disclaimer of Warranties and Limitation of Liability. 72 | 73 | Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. 74 | To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. 75 | The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 76 | Section 6 – Term and Termination. 77 | 78 | This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 79 | Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 80 | 81 | automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 82 | upon express reinstatement by the Licensor. 83 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 84 | For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 85 | Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 86 | Section 7 – Other Terms and Conditions. 87 | 88 | The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 89 | Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 90 | Section 8 – Interpretation. 91 | 92 | For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 93 | To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 94 | No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 95 | Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 96 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 14 7 | productGUID: 8186e616c9e93cc458410decabfbc117 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: DefaultCompany 15 | productName: Unity-Shader-Tutorials 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 0 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | macFullscreenMode: 2 95 | d3d11FullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | n3dsDisableStereoscopicView: 0 102 | n3dsEnableSharedListOpt: 1 103 | n3dsEnableVSync: 0 104 | xboxOneResolution: 0 105 | xboxOneSResolution: 0 106 | xboxOneXResolution: 3 107 | xboxOneMonoLoggingLevel: 0 108 | xboxOneLoggingLevel: 1 109 | xboxOneDisableEsram: 0 110 | xboxOnePresentImmediateThreshold: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | wiiUTVResolution: 0 115 | wiiUGamePadMSAA: 1 116 | wiiUSupportsNunchuk: 0 117 | wiiUSupportsClassicController: 0 118 | wiiUSupportsBalanceBoard: 0 119 | wiiUSupportsMotionPlus: 0 120 | wiiUSupportsProController: 0 121 | wiiUAllowScreenCapture: 1 122 | wiiUControllerCount: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 0 135 | xboxOneEnable7thCore: 0 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 0 150 | oculus: 151 | sharedDepthBuffer: 0 152 | dashSupport: 0 153 | protectGraphicsMemory: 0 154 | useHDRDisplay: 0 155 | m_ColorGamuts: 00000000 156 | targetPixelDensity: 30 157 | resolutionScalingMode: 0 158 | androidSupportedAspectRatio: 1 159 | androidMaxAspectRatio: 2.1 160 | applicationIdentifier: {} 161 | buildNumber: {} 162 | AndroidBundleVersionCode: 1 163 | AndroidMinSdkVersion: 16 164 | AndroidTargetSdkVersion: 0 165 | AndroidPreferredInstallLocation: 1 166 | aotOptions: 167 | stripEngineCode: 1 168 | iPhoneStrippingLevel: 0 169 | iPhoneScriptCallOptimization: 0 170 | ForceInternetPermission: 0 171 | ForceSDCardPermission: 0 172 | CreateWallpaper: 0 173 | APKExpansionFiles: 0 174 | keepLoadedShadersAlive: 0 175 | StripUnusedMeshComponents: 0 176 | VertexChannelCompressionMask: 177 | serializedVersion: 2 178 | m_Bits: 238 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 7.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 9.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | iPhoneSplashScreen: {fileID: 0} 191 | iPhoneHighResSplashScreen: {fileID: 0} 192 | iPhoneTallHighResSplashScreen: {fileID: 0} 193 | iPhone47inSplashScreen: {fileID: 0} 194 | iPhone55inPortraitSplashScreen: {fileID: 0} 195 | iPhone55inLandscapeSplashScreen: {fileID: 0} 196 | iPhone58inPortraitSplashScreen: {fileID: 0} 197 | iPhone58inLandscapeSplashScreen: {fileID: 0} 198 | iPadPortraitSplashScreen: {fileID: 0} 199 | iPadHighResPortraitSplashScreen: {fileID: 0} 200 | iPadLandscapeSplashScreen: {fileID: 0} 201 | iPadHighResLandscapeSplashScreen: {fileID: 0} 202 | appleTVSplashScreen: {fileID: 0} 203 | appleTVSplashScreen2x: {fileID: 0} 204 | tvOSSmallIconLayers: [] 205 | tvOSSmallIconLayers2x: [] 206 | tvOSLargeIconLayers: [] 207 | tvOSLargeIconLayers2x: [] 208 | tvOSTopShelfImageLayers: [] 209 | tvOSTopShelfImageLayers2x: [] 210 | tvOSTopShelfImageWideLayers: [] 211 | tvOSTopShelfImageWideLayers2x: [] 212 | iOSLaunchScreenType: 0 213 | iOSLaunchScreenPortrait: {fileID: 0} 214 | iOSLaunchScreenLandscape: {fileID: 0} 215 | iOSLaunchScreenBackgroundColor: 216 | serializedVersion: 2 217 | rgba: 0 218 | iOSLaunchScreenFillPct: 100 219 | iOSLaunchScreenSize: 100 220 | iOSLaunchScreenCustomXibPath: 221 | iOSLaunchScreeniPadType: 0 222 | iOSLaunchScreeniPadImage: {fileID: 0} 223 | iOSLaunchScreeniPadBackgroundColor: 224 | serializedVersion: 2 225 | rgba: 0 226 | iOSLaunchScreeniPadFillPct: 100 227 | iOSLaunchScreeniPadSize: 100 228 | iOSLaunchScreeniPadCustomXibPath: 229 | iOSUseLaunchScreenStoryboard: 0 230 | iOSLaunchScreenCustomStoryboardPath: 231 | iOSDeviceRequirements: [] 232 | iOSURLSchemes: [] 233 | iOSBackgroundModes: 0 234 | iOSMetalForceHardShadows: 0 235 | metalEditorSupport: 1 236 | metalAPIValidation: 1 237 | iOSRenderExtraFrameOnPause: 0 238 | appleDeveloperTeamID: 239 | iOSManualSigningProvisioningProfileID: 240 | tvOSManualSigningProvisioningProfileID: 241 | appleEnableAutomaticSigning: 0 242 | clonedFromGUID: 00000000000000000000000000000000 243 | AndroidTargetDevice: 0 244 | AndroidSplashScreenScale: 0 245 | androidSplashScreen: {fileID: 0} 246 | AndroidKeystoreName: 247 | AndroidKeyaliasName: 248 | AndroidTVCompatibility: 1 249 | AndroidIsGame: 1 250 | AndroidEnableTango: 0 251 | androidEnableBanner: 1 252 | androidUseLowAccuracyLocation: 0 253 | m_AndroidBanners: 254 | - width: 320 255 | height: 180 256 | banner: {fileID: 0} 257 | androidGamepadSupportLevel: 0 258 | resolutionDialogBanner: {fileID: 0} 259 | m_BuildTargetIcons: [] 260 | m_BuildTargetBatching: [] 261 | m_BuildTargetGraphicsAPIs: [] 262 | m_BuildTargetVRSettings: [] 263 | m_BuildTargetEnableVuforiaSettings: [] 264 | openGLRequireES31: 0 265 | openGLRequireES31AEP: 0 266 | m_TemplateCustomTags: {} 267 | mobileMTRendering: 268 | Android: 1 269 | iPhone: 1 270 | tvOS: 1 271 | m_BuildTargetGroupLightmapEncodingQuality: [] 272 | wiiUTitleID: 0005000011000000 273 | wiiUGroupID: 00010000 274 | wiiUCommonSaveSize: 4096 275 | wiiUAccountSaveSize: 2048 276 | wiiUOlvAccessKey: 0 277 | wiiUTinCode: 0 278 | wiiUJoinGameId: 0 279 | wiiUJoinGameModeMask: 0000000000000000 280 | wiiUCommonBossSize: 0 281 | wiiUAccountBossSize: 0 282 | wiiUAddOnUniqueIDs: [] 283 | wiiUMainThreadStackSize: 3072 284 | wiiULoaderThreadStackSize: 1024 285 | wiiUSystemHeapSize: 128 286 | wiiUTVStartupScreen: {fileID: 0} 287 | wiiUGamePadStartupScreen: {fileID: 0} 288 | wiiUDrcBufferDisabled: 0 289 | wiiUProfilerLibPath: 290 | playModeTestRunnerEnabled: 0 291 | actionOnDotNetUnhandledException: 1 292 | enableInternalProfiler: 0 293 | logObjCUncaughtExceptions: 1 294 | enableCrashReportAPI: 0 295 | cameraUsageDescription: 296 | locationUsageDescription: 297 | microphoneUsageDescription: 298 | switchNetLibKey: 299 | switchSocketMemoryPoolSize: 6144 300 | switchSocketAllocatorPoolSize: 128 301 | switchSocketConcurrencyLimit: 14 302 | switchScreenResolutionBehavior: 2 303 | switchUseCPUProfiler: 0 304 | switchApplicationID: 0x01004b9000490000 305 | switchNSODependencies: 306 | switchTitleNames_0: 307 | switchTitleNames_1: 308 | switchTitleNames_2: 309 | switchTitleNames_3: 310 | switchTitleNames_4: 311 | switchTitleNames_5: 312 | switchTitleNames_6: 313 | switchTitleNames_7: 314 | switchTitleNames_8: 315 | switchTitleNames_9: 316 | switchTitleNames_10: 317 | switchTitleNames_11: 318 | switchTitleNames_12: 319 | switchTitleNames_13: 320 | switchTitleNames_14: 321 | switchPublisherNames_0: 322 | switchPublisherNames_1: 323 | switchPublisherNames_2: 324 | switchPublisherNames_3: 325 | switchPublisherNames_4: 326 | switchPublisherNames_5: 327 | switchPublisherNames_6: 328 | switchPublisherNames_7: 329 | switchPublisherNames_8: 330 | switchPublisherNames_9: 331 | switchPublisherNames_10: 332 | switchPublisherNames_11: 333 | switchPublisherNames_12: 334 | switchPublisherNames_13: 335 | switchPublisherNames_14: 336 | switchIcons_0: {fileID: 0} 337 | switchIcons_1: {fileID: 0} 338 | switchIcons_2: {fileID: 0} 339 | switchIcons_3: {fileID: 0} 340 | switchIcons_4: {fileID: 0} 341 | switchIcons_5: {fileID: 0} 342 | switchIcons_6: {fileID: 0} 343 | switchIcons_7: {fileID: 0} 344 | switchIcons_8: {fileID: 0} 345 | switchIcons_9: {fileID: 0} 346 | switchIcons_10: {fileID: 0} 347 | switchIcons_11: {fileID: 0} 348 | switchIcons_12: {fileID: 0} 349 | switchIcons_13: {fileID: 0} 350 | switchIcons_14: {fileID: 0} 351 | switchSmallIcons_0: {fileID: 0} 352 | switchSmallIcons_1: {fileID: 0} 353 | switchSmallIcons_2: {fileID: 0} 354 | switchSmallIcons_3: {fileID: 0} 355 | switchSmallIcons_4: {fileID: 0} 356 | switchSmallIcons_5: {fileID: 0} 357 | switchSmallIcons_6: {fileID: 0} 358 | switchSmallIcons_7: {fileID: 0} 359 | switchSmallIcons_8: {fileID: 0} 360 | switchSmallIcons_9: {fileID: 0} 361 | switchSmallIcons_10: {fileID: 0} 362 | switchSmallIcons_11: {fileID: 0} 363 | switchSmallIcons_12: {fileID: 0} 364 | switchSmallIcons_13: {fileID: 0} 365 | switchSmallIcons_14: {fileID: 0} 366 | switchManualHTML: 367 | switchAccessibleURLs: 368 | switchLegalInformation: 369 | switchMainThreadStackSize: 1048576 370 | switchPresenceGroupId: 371 | switchLogoHandling: 0 372 | switchReleaseVersion: 0 373 | switchDisplayVersion: 1.0.0 374 | switchStartupUserAccount: 0 375 | switchTouchScreenUsage: 0 376 | switchSupportedLanguagesMask: 0 377 | switchLogoType: 0 378 | switchApplicationErrorCodeCategory: 379 | switchUserAccountSaveDataSize: 0 380 | switchUserAccountSaveDataJournalSize: 0 381 | switchApplicationAttribute: 0 382 | switchCardSpecSize: -1 383 | switchCardSpecClock: -1 384 | switchRatingsMask: 0 385 | switchRatingsInt_0: 0 386 | switchRatingsInt_1: 0 387 | switchRatingsInt_2: 0 388 | switchRatingsInt_3: 0 389 | switchRatingsInt_4: 0 390 | switchRatingsInt_5: 0 391 | switchRatingsInt_6: 0 392 | switchRatingsInt_7: 0 393 | switchRatingsInt_8: 0 394 | switchRatingsInt_9: 0 395 | switchRatingsInt_10: 0 396 | switchRatingsInt_11: 0 397 | switchLocalCommunicationIds_0: 398 | switchLocalCommunicationIds_1: 399 | switchLocalCommunicationIds_2: 400 | switchLocalCommunicationIds_3: 401 | switchLocalCommunicationIds_4: 402 | switchLocalCommunicationIds_5: 403 | switchLocalCommunicationIds_6: 404 | switchLocalCommunicationIds_7: 405 | switchParentalControl: 0 406 | switchAllowsScreenshot: 1 407 | switchAllowsVideoCapturing: 1 408 | switchAllowsRuntimeAddOnContentInstall: 0 409 | switchDataLossConfirmation: 0 410 | switchSupportedNpadStyles: 3 411 | switchSocketConfigEnabled: 0 412 | switchTcpInitialSendBufferSize: 32 413 | switchTcpInitialReceiveBufferSize: 64 414 | switchTcpAutoSendBufferSizeMax: 256 415 | switchTcpAutoReceiveBufferSizeMax: 256 416 | switchUdpSendBufferSize: 9 417 | switchUdpReceiveBufferSize: 42 418 | switchSocketBufferEfficiency: 4 419 | switchSocketInitializeEnabled: 1 420 | switchNetworkInterfaceManagerInitializeEnabled: 1 421 | switchPlayerConnectionEnabled: 1 422 | ps4NPAgeRating: 12 423 | ps4NPTitleSecret: 424 | ps4NPTrophyPackPath: 425 | ps4ParentalLevel: 11 426 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 427 | ps4Category: 0 428 | ps4MasterVersion: 01.00 429 | ps4AppVersion: 01.00 430 | ps4AppType: 0 431 | ps4ParamSfxPath: 432 | ps4VideoOutPixelFormat: 0 433 | ps4VideoOutInitialWidth: 1920 434 | ps4VideoOutBaseModeInitialWidth: 1920 435 | ps4VideoOutReprojectionRate: 60 436 | ps4PronunciationXMLPath: 437 | ps4PronunciationSIGPath: 438 | ps4BackgroundImagePath: 439 | ps4StartupImagePath: 440 | ps4StartupImagesFolder: 441 | ps4IconImagesFolder: 442 | ps4SaveDataImagePath: 443 | ps4SdkOverride: 444 | ps4BGMPath: 445 | ps4ShareFilePath: 446 | ps4ShareOverlayImagePath: 447 | ps4PrivacyGuardImagePath: 448 | ps4NPtitleDatPath: 449 | ps4RemotePlayKeyAssignment: -1 450 | ps4RemotePlayKeyMappingDir: 451 | ps4PlayTogetherPlayerCount: 0 452 | ps4EnterButtonAssignment: 1 453 | ps4ApplicationParam1: 0 454 | ps4ApplicationParam2: 0 455 | ps4ApplicationParam3: 0 456 | ps4ApplicationParam4: 0 457 | ps4DownloadDataSize: 0 458 | ps4GarlicHeapSize: 2048 459 | ps4ProGarlicHeapSize: 2560 460 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 461 | ps4pnSessions: 1 462 | ps4pnPresence: 1 463 | ps4pnFriends: 1 464 | ps4pnGameCustomData: 1 465 | playerPrefsSupport: 0 466 | restrictedAudioUsageRights: 0 467 | ps4UseResolutionFallback: 0 468 | ps4ReprojectionSupport: 0 469 | ps4UseAudio3dBackend: 0 470 | ps4SocialScreenEnabled: 0 471 | ps4ScriptOptimizationLevel: 0 472 | ps4Audio3dVirtualSpeakerCount: 14 473 | ps4attribCpuUsage: 0 474 | ps4PatchPkgPath: 475 | ps4PatchLatestPkgPath: 476 | ps4PatchChangeinfoPath: 477 | ps4PatchDayOne: 0 478 | ps4attribUserManagement: 0 479 | ps4attribMoveSupport: 0 480 | ps4attrib3DSupport: 0 481 | ps4attribShareSupport: 0 482 | ps4attribExclusiveVR: 0 483 | ps4disableAutoHideSplash: 0 484 | ps4videoRecordingFeaturesUsed: 0 485 | ps4contentSearchFeaturesUsed: 0 486 | ps4attribEyeToEyeDistanceSettingVR: 0 487 | ps4IncludedModules: [] 488 | monoEnv: 489 | psp2Splashimage: {fileID: 0} 490 | psp2NPTrophyPackPath: 491 | psp2NPSupportGBMorGJP: 0 492 | psp2NPAgeRating: 12 493 | psp2NPTitleDatPath: 494 | psp2NPCommsID: 495 | psp2NPCommunicationsID: 496 | psp2NPCommsPassphrase: 497 | psp2NPCommsSig: 498 | psp2ParamSfxPath: 499 | psp2ManualPath: 500 | psp2LiveAreaGatePath: 501 | psp2LiveAreaBackroundPath: 502 | psp2LiveAreaPath: 503 | psp2LiveAreaTrialPath: 504 | psp2PatchChangeInfoPath: 505 | psp2PatchOriginalPackage: 506 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 507 | psp2KeystoneFile: 508 | psp2MemoryExpansionMode: 0 509 | psp2DRMType: 0 510 | psp2StorageType: 0 511 | psp2MediaCapacity: 0 512 | psp2DLCConfigPath: 513 | psp2ThumbnailPath: 514 | psp2BackgroundPath: 515 | psp2SoundPath: 516 | psp2TrophyCommId: 517 | psp2TrophyPackagePath: 518 | psp2PackagedResourcesPath: 519 | psp2SaveDataQuota: 10240 520 | psp2ParentalLevel: 1 521 | psp2ShortTitle: Not Set 522 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 523 | psp2Category: 0 524 | psp2MasterVersion: 01.00 525 | psp2AppVersion: 01.00 526 | psp2TVBootMode: 0 527 | psp2EnterButtonAssignment: 2 528 | psp2TVDisableEmu: 0 529 | psp2AllowTwitterDialog: 1 530 | psp2Upgradable: 0 531 | psp2HealthWarning: 0 532 | psp2UseLibLocation: 0 533 | psp2InfoBarOnStartup: 0 534 | psp2InfoBarColor: 0 535 | psp2ScriptOptimizationLevel: 0 536 | psmSplashimage: {fileID: 0} 537 | splashScreenBackgroundSourceLandscape: {fileID: 0} 538 | splashScreenBackgroundSourcePortrait: {fileID: 0} 539 | spritePackerPolicy: 540 | webGLMemorySize: 256 541 | webGLExceptionSupport: 1 542 | webGLNameFilesAsHashes: 0 543 | webGLDataCaching: 0 544 | webGLDebugSymbols: 0 545 | webGLEmscriptenArgs: 546 | webGLModulesDirectory: 547 | webGLTemplate: APPLICATION:Default 548 | webGLAnalyzeBuildSize: 0 549 | webGLUseEmbeddedResources: 0 550 | webGLUseWasm: 0 551 | webGLCompressionFormat: 1 552 | scriptingDefineSymbols: {} 553 | platformArchitecture: {} 554 | scriptingBackend: {} 555 | incrementalIl2cppBuild: {} 556 | additionalIl2CppArgs: 557 | scriptingRuntimeVersion: 0 558 | apiCompatibilityLevelPerPlatform: {} 559 | m_RenderingPath: 1 560 | m_MobileRenderingPath: 1 561 | metroPackageName: Unity-Shader-Tutorials 562 | metroPackageVersion: 563 | metroCertificatePath: 564 | metroCertificatePassword: 565 | metroCertificateSubject: 566 | metroCertificateIssuer: 567 | metroCertificateNotAfter: 0000000000000000 568 | metroApplicationDescription: Unity-Shader-Tutorials 569 | wsaImages: {} 570 | metroTileShortName: 571 | metroCommandLineArgsFile: 572 | metroTileShowName: 0 573 | metroMediumTileShowName: 0 574 | metroLargeTileShowName: 0 575 | metroWideTileShowName: 0 576 | metroDefaultTileSize: 1 577 | metroTileForegroundText: 2 578 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 579 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 580 | a: 1} 581 | metroSplashScreenUseBackgroundColor: 0 582 | platformCapabilities: {} 583 | metroFTAName: 584 | metroFTAFileTypes: [] 585 | metroProtocolName: 586 | metroCompilationOverrides: 1 587 | tizenProductDescription: 588 | tizenProductURL: 589 | tizenSigningProfileName: 590 | tizenGPSPermissions: 0 591 | tizenMicrophonePermissions: 0 592 | tizenDeploymentTarget: 593 | tizenDeploymentTargetType: -1 594 | tizenMinOSVersion: 1 595 | n3dsUseExtSaveData: 0 596 | n3dsCompressStaticMem: 1 597 | n3dsExtSaveDataNumber: 0x12345 598 | n3dsStackSize: 131072 599 | n3dsTargetPlatform: 2 600 | n3dsRegion: 7 601 | n3dsMediaSize: 0 602 | n3dsLogoStyle: 3 603 | n3dsTitle: GameName 604 | n3dsProductCode: 605 | n3dsApplicationId: 0xFF3FF 606 | XboxOneProductId: 607 | XboxOneUpdateKey: 608 | XboxOneSandboxId: 609 | XboxOneContentId: 610 | XboxOneTitleId: 611 | XboxOneSCId: 612 | XboxOneGameOsOverridePath: 613 | XboxOnePackagingOverridePath: 614 | XboxOneAppManifestOverridePath: 615 | XboxOnePackageEncryption: 0 616 | XboxOnePackageUpdateGranularity: 2 617 | XboxOneDescription: 618 | XboxOneLanguage: 619 | - enus 620 | XboxOneCapability: [] 621 | XboxOneGameRating: {} 622 | XboxOneIsContentPackage: 0 623 | XboxOneEnableGPUVariability: 0 624 | XboxOneSockets: {} 625 | XboxOneSplashScreen: {fileID: 0} 626 | XboxOneAllowedProductIds: [] 627 | XboxOnePersistentLocalStorageSize: 0 628 | xboxOneScriptCompiler: 0 629 | vrEditorSettings: 630 | daydream: 631 | daydreamIconForeground: {fileID: 0} 632 | daydreamIconBackground: {fileID: 0} 633 | cloudServicesEnabled: {} 634 | facebookSdkVersion: 7.9.4 635 | apiCompatibilityLevel: 2 636 | cloudProjectId: 637 | projectName: 638 | organizationId: 639 | cloudEnabled: 0 640 | enableNativePlatformBackendsForNewInputSystem: 0 641 | disableOldInputManagerSupport: 0 642 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.3.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-Shader-Tutorials 2 | 3 | These resources are usable under a NON-COMMERCIAL license, specifically, the Creative Commons Attribution-NonCommercial-ShareAlike. https://creativecommons.org/licenses/ 4 | 5 | "This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms." 6 | -------------------------------------------------------------------------------- /UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | --------------------------------------------------------------------------------