mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-11 00:31:28 -05:00
20 lines
524 B
Text
20 lines
524 B
Text
|
uniform vec4 _WorldSpaceLightPos0;
|
||
|
uniform sampler2D _MainTex;
|
||
|
uniform vec4 _LightColor0;
|
||
|
uniform vec4 _Color;
|
||
|
void main ()
|
||
|
{
|
||
|
vec4 c_1;
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = (texture2D (_MainTex, gl_TexCoord[0].xy) * _Color);
|
||
|
float tmpvar_3;
|
||
|
tmpvar_3 = tmpvar_2.w;
|
||
|
vec4 c_4;
|
||
|
c_4.xyz = ((tmpvar_2.xyz * _LightColor0.xyz) * (max (0.0, dot (gl_TexCoord[1].xyz, _WorldSpaceLightPos0.xyz)) * 2.0));
|
||
|
c_4.w = tmpvar_3;
|
||
|
c_1.xyz = (c_4.xyz + (tmpvar_2.xyz * gl_TexCoord[2].xyz));
|
||
|
c_1.w = tmpvar_3;
|
||
|
gl_FragData[0] = c_1;
|
||
|
}
|
||
|
|