Files
JJBB/Assets/Project/Shader/T3MBase.cginc
2024-08-23 15:49:34 +08:00

20 lines
688 B
HLSL

// 处理Gles 2.0平台下,一些常规计算方法不支持的情况
#ifndef T3M_BASE_INCLUDE
#define T3M_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); \
fixed4 splat_0 = tex2D(_Splat0, uv_0); \
fixed4 splat_1 = tex2D(_Splat1, uv_1); \
fixed4 splat_2 = tex2D(_Splat2, uv_2); \
fixed4 control = tex2D(_Control, i.uv); \
fixed4 c = splat_0 * control.r + splat_1 * control.g + splat_2 * control.b;
uniform sampler2D _Splat0, _Splat1, _Splat2, _Control;
uniform float4 _Splat0_ST, _Splat1_ST, _Splat2_ST;
uniform half _Emission;
#endif