mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-02 20:36:50 -05:00
60 lines
1.2 KiB
Text
60 lines
1.2 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
vec2 texgencoord;
|
|
};
|
|
uniform sampler2D _MainTex;
|
|
uniform sampler2D _GUIClipTexture;
|
|
vec4 frag (
|
|
in v2f i
|
|
)
|
|
{
|
|
vec4 col;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = texture2D (_MainTex, i.texcoord);
|
|
vec3 tmpvar_2;
|
|
tmpvar_2 = (tmpvar_1.xyz * i.color.xyz);
|
|
col.xyz = tmpvar_2.xyz.xyz;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_GUIClipTexture, i.texgencoord);
|
|
float tmpvar_4;
|
|
tmpvar_4 = (i.color.w * tmpvar_3.w);
|
|
col.w = vec4(tmpvar_4).w;
|
|
return col;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_i;
|
|
vec4 xl_retval;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_i.vertex = tmpvar_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = gl_Color.xyzw;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = tmpvar_2;
|
|
xlt_i.color = tmpvar_3;
|
|
vec2 tmpvar_4;
|
|
tmpvar_4 = gl_TexCoord[0].xy;
|
|
vec2 tmpvar_5;
|
|
tmpvar_5 = tmpvar_4;
|
|
xlt_i.texcoord = tmpvar_5;
|
|
vec2 tmpvar_6;
|
|
tmpvar_6 = gl_TexCoord[1].xy;
|
|
vec2 tmpvar_7;
|
|
tmpvar_7 = tmpvar_6;
|
|
xlt_i.texgencoord = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = frag (xlt_i);
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = tmpvar_8;
|
|
xl_retval = tmpvar_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = xl_retval.xyzw;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = tmpvar_10;
|
|
gl_FragData[0] = tmpvar_11;
|
|
}
|
|
|