mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
87 lines
1.9 KiB
Text
87 lines
1.9 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
vec2 texgencoord;
|
|
};
|
|
struct appdata_t {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
};
|
|
uniform mat4 _GUIClipTextureMatrix;
|
|
uniform vec4 _MainTex_ST;
|
|
v2f vert (
|
|
in appdata_t v_1
|
|
)
|
|
{
|
|
vec4 texgen_2;
|
|
v2f o_3;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = (gl_ModelViewProjectionMatrix * v_1.vertex);
|
|
o_3.vertex = tmpvar_4;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = (gl_ModelViewMatrix * v_1.vertex);
|
|
texgen_2 = tmpvar_5;
|
|
vec2 tmpvar_6;
|
|
tmpvar_6 = (_GUIClipTextureMatrix * texgen_2).xy;
|
|
vec2 tmpvar_7;
|
|
tmpvar_7 = tmpvar_6;
|
|
o_3.texgencoord = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = v_1.color;
|
|
o_3.color = tmpvar_8;
|
|
vec2 tmpvar_9;
|
|
tmpvar_9 = ((v_1.texcoord.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
o_3.texcoord = tmpvar_9;
|
|
return o_3;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
appdata_t xlt_v_10;
|
|
v2f xl_retval_11;
|
|
vec4 tmpvar_12;
|
|
tmpvar_12 = gl_Vertex.xyzw;
|
|
vec4 tmpvar_13;
|
|
tmpvar_13 = tmpvar_12;
|
|
xlt_v_10.vertex = tmpvar_13;
|
|
vec4 tmpvar_14;
|
|
tmpvar_14 = gl_Color.xyzw;
|
|
vec4 tmpvar_15;
|
|
tmpvar_15 = tmpvar_14;
|
|
xlt_v_10.color = tmpvar_15;
|
|
vec2 tmpvar_16;
|
|
tmpvar_16 = gl_MultiTexCoord0.xy;
|
|
vec2 tmpvar_17;
|
|
tmpvar_17 = tmpvar_16;
|
|
xlt_v_10.texcoord = tmpvar_17;
|
|
v2f tmpvar_18;
|
|
tmpvar_18 = vert (xlt_v_10);
|
|
v2f tmpvar_19;
|
|
tmpvar_19 = tmpvar_18;
|
|
xl_retval_11 = tmpvar_19;
|
|
vec4 tmpvar_20;
|
|
tmpvar_20 = xl_retval_11.vertex.xyzw;
|
|
vec4 tmpvar_21;
|
|
tmpvar_21 = tmpvar_20;
|
|
gl_Position = tmpvar_21;
|
|
vec4 tmpvar_22;
|
|
tmpvar_22 = xl_retval_11.color.xyzw;
|
|
vec4 tmpvar_23;
|
|
tmpvar_23 = tmpvar_22;
|
|
gl_FrontColor = tmpvar_23;
|
|
vec4 tmpvar_24;
|
|
tmpvar_24.zw = vec2(0.0, 0.0);
|
|
tmpvar_24.xy = xl_retval_11.texcoord.xy;
|
|
vec4 tmpvar_25;
|
|
tmpvar_25 = tmpvar_24;
|
|
gl_TexCoord[0] = tmpvar_25;
|
|
vec4 tmpvar_26;
|
|
tmpvar_26.zw = vec2(0.0, 0.0);
|
|
tmpvar_26.xy = xl_retval_11.texgencoord.xy;
|
|
vec4 tmpvar_27;
|
|
tmpvar_27 = tmpvar_26;
|
|
gl_TexCoord[1] = tmpvar_27;
|
|
}
|
|
|