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