Shader "UltraCombos/Frozen/Snowflakes" { Properties { [HDR] _Color("Color", Color) = (1,1,1,1) _MainTex("Texture", 2D) = "white" {} _SubTex1("Sub-Texture 1", 2D) = "white" {} _SubTex2("Sub-Texture 2", 2D) = "white" {} _SubTex3("Sub-Texture 3", 2D) = "white" {} _SubTex4("Sub-Texture 4", 2D) = "white" {} _SubTex5("Sub-Texture 5", 2D) = "white" {} _SubTex6("Sub-Texture 6", 2D) = "white" {} _SubTex7("Sub-Texture 7", 2D) = "white" {} _SubTex8("Sub-Texture 8", 2D) = "white" {} _SubTex9("Sub-Texture 9", 2D) = "white" {} } SubShader { //Tags { "RenderType"="Opaque" } Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } LOD 100 ZWrite Off ZTest Off Blend SrcAlpha OneMinusSrcAlpha Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; float4 uv : TEXCOORD0; float4 color : COLOR; }; struct v2f { float4 vertex : SV_POSITION; float4 uv : TEXCOORD0; float4 color : COLOR; }; sampler2D _MainTex; //float4 _MainTex_ST; sampler2D _SubTex1; sampler2D _SubTex2; sampler2D _SubTex3; sampler2D _SubTex4; sampler2D _SubTex5; sampler2D _SubTex6; sampler2D _SubTex7; sampler2D _SubTex8; sampler2D _SubTex9; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); //o.uv = TRANSFORM_TEX(v.uv.xy, _MainTex); o.uv = v.uv; //o.uv.xy = (o.uv.xy - float2(0.5, 0.5)) * 2.0 + float2(0.5, 0.5); //o.uv.x = saturate(o.uv.x); //o.uv.y = saturate(o.uv.y); o.color = v.color; return o; } fixed4 frag (v2f i) : SV_Target { const int tex_count = 10; fixed4 tex_colors[tex_count]; tex_colors[0] = tex2D(_MainTex, i.uv.xy); tex_colors[1] = tex2D(_SubTex1, i.uv.xy); tex_colors[2] = tex2D(_SubTex2, i.uv.xy); tex_colors[3] = tex2D(_SubTex3, i.uv.xy); tex_colors[4] = tex2D(_SubTex4, i.uv.xy); tex_colors[5] = tex2D(_SubTex5, i.uv.xy); tex_colors[6] = tex2D(_SubTex6, i.uv.xy); tex_colors[7] = tex2D(_SubTex7, i.uv.xy); tex_colors[8] = tex2D(_SubTex8, i.uv.xy); tex_colors[9] = tex2D(_SubTex9, i.uv.xy); int tex_index = i.uv.z * tex_count; fixed4 col = tex_colors[tex_index] * i.color;; return col; } ENDCG } } }