// 处理Gles 2.0平台下,一些常规计算方法不支持的情况 #ifndef T4M_BASE_INCLUDE #define T4M_BASE_INCLUDE #include "UnityGiBase.cginc" #define COLOR_FRAG \ float2 uv_0 = TRANSFORM_TEX(i.uv, _Splat0); \ float2 uv_1 = TRANSFORM_TEX(i.uv, _Splat1); \ float2 uv_2 = TRANSFORM_TEX(i.uv, _Splat2); \ float2 uv_3 = TRANSFORM_TEX(i.uv, _Splat3); \ fixed4 splat_0 = tex2D(_Splat0, uv_0); \ fixed4 splat_1 = tex2D(_Splat1, uv_1); \ fixed4 splat_2 = tex2D(_Splat2, uv_2); \ fixed4 splat_3 = tex2D(_Splat3, uv_3); \ fixed4 control = tex2D(_Control, i.uv); \ fixed4 c = splat_0 * control.r + splat_1 * control.g + splat_2 * control.b + splat_3 * control.a uniform sampler2D _Splat0, _Splat1, _Splat2, _Splat3, _Control; uniform float4 _Splat0_ST, _Splat1_ST, _Splat2_ST, _Splat3_ST; uniform half _Emission; #endif