mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
60 lines
1.3 KiB
Text
60 lines
1.3 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
vec2 texgencoord;
|
|
};
|
|
uniform sampler2D _GUIClipTexture;
|
|
uniform sampler2D _MainTex;
|
|
vec4 frag (
|
|
in v2f i_1
|
|
)
|
|
{
|
|
vec4 col_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_MainTex, i_1.texcoord);
|
|
vec3 tmpvar_4;
|
|
tmpvar_4 = (tmpvar_3.xyz * i_1.color.xyz);
|
|
col_2.xyz = tmpvar_4.xyz.xyz;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = texture2D (_GUIClipTexture, i_1.texgencoord);
|
|
float tmpvar_6;
|
|
tmpvar_6 = (i_1.color.w * tmpvar_5.w);
|
|
col_2.w = vec4(tmpvar_6).w;
|
|
return col_2;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_i_7;
|
|
vec4 xl_retval_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_i_7.vertex = tmpvar_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = gl_Color.xyzw;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = tmpvar_10;
|
|
xlt_i_7.color = tmpvar_11;
|
|
vec2 tmpvar_12;
|
|
tmpvar_12 = gl_TexCoord[0].xy;
|
|
vec2 tmpvar_13;
|
|
tmpvar_13 = tmpvar_12;
|
|
xlt_i_7.texcoord = tmpvar_13;
|
|
vec2 tmpvar_14;
|
|
tmpvar_14 = gl_TexCoord[1].xy;
|
|
vec2 tmpvar_15;
|
|
tmpvar_15 = tmpvar_14;
|
|
xlt_i_7.texgencoord = tmpvar_15;
|
|
vec4 tmpvar_16;
|
|
tmpvar_16 = frag (xlt_i_7);
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = tmpvar_16;
|
|
xl_retval_8 = tmpvar_17;
|
|
vec4 tmpvar_18;
|
|
tmpvar_18 = xl_retval_8.xyzw;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19 = tmpvar_18;
|
|
gl_FragData[0] = tmpvar_19;
|
|
}
|
|
|