mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 11:05:36 -05:00
32 lines
914 B
Text
32 lines
914 B
Text
uniform sampler2D _Control;
|
|
uniform sampler2D _LightBuffer;
|
|
uniform sampler2D _Splat0;
|
|
uniform sampler2D _Splat1;
|
|
uniform sampler2D _Splat2;
|
|
uniform sampler2D _Splat3;
|
|
uniform vec4 unity_Ambient;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0];
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = gl_TexCoord[1];
|
|
vec4 light_3;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = texture2D (_Control, tmpvar_1.xy);
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = -(log2(texture2DProj (_LightBuffer, gl_TexCoord[3])));
|
|
light_3.w = tmpvar_5.w;
|
|
light_3.xyz = (tmpvar_5.xyz + unity_Ambient.xyz);
|
|
vec4 c_6;
|
|
c_6.xyz = (((
|
|
((tmpvar_4.x * texture2D (_Splat0, tmpvar_1.zw).xyz) + (tmpvar_4.y * texture2D (_Splat1, tmpvar_2.xy).xyz))
|
|
+
|
|
(tmpvar_4.z * texture2D (_Splat2, tmpvar_2.zw).xyz)
|
|
) + (tmpvar_4.w * texture2D (_Splat3, gl_TexCoord[2].xy).xyz)) * light_3.xyz);
|
|
c_6.w = 0.0;
|
|
gl_FragData[0] = c_6;
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 12 alu 6 tex 0 flow
|