mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
87 lines
1.8 KiB
Text
87 lines
1.8 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
vec2 texgencoord;
|
|
};
|
|
struct appdata_t {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
};
|
|
uniform vec4 _MainTex_ST;
|
|
uniform mat4 _GUIClipTextureMatrix;
|
|
v2f vert (
|
|
in appdata_t v
|
|
)
|
|
{
|
|
vec4 texgen;
|
|
v2f o;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = (gl_ModelViewProjectionMatrix * v.vertex);
|
|
o.vertex = tmpvar_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = (gl_ModelViewMatrix * v.vertex);
|
|
texgen = tmpvar_2;
|
|
vec2 tmpvar_3;
|
|
tmpvar_3 = (_GUIClipTextureMatrix * texgen).xy;
|
|
vec2 tmpvar_4;
|
|
tmpvar_4 = tmpvar_3;
|
|
o.texgencoord = tmpvar_4;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = v.color;
|
|
o.color = tmpvar_5;
|
|
vec2 tmpvar_6;
|
|
tmpvar_6 = ((v.texcoord.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
o.texcoord = tmpvar_6;
|
|
return o;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
appdata_t xlt_v;
|
|
v2f xl_retval;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = gl_Vertex.xyzw;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = tmpvar_1;
|
|
xlt_v.vertex = tmpvar_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = gl_Color.xyzw;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = tmpvar_3;
|
|
xlt_v.color = tmpvar_4;
|
|
vec2 tmpvar_5;
|
|
tmpvar_5 = gl_MultiTexCoord0.xy;
|
|
vec2 tmpvar_6;
|
|
tmpvar_6 = tmpvar_5;
|
|
xlt_v.texcoord = tmpvar_6;
|
|
v2f tmpvar_7;
|
|
tmpvar_7 = vert (xlt_v);
|
|
v2f tmpvar_8;
|
|
tmpvar_8 = tmpvar_7;
|
|
xl_retval = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = xl_retval.vertex.xyzw;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = tmpvar_9;
|
|
gl_Position = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = xl_retval.color.xyzw;
|
|
vec4 tmpvar_12;
|
|
tmpvar_12 = tmpvar_11;
|
|
gl_FrontColor = tmpvar_12;
|
|
vec4 tmpvar_13;
|
|
tmpvar_13.zw = vec2(0.0, 0.0);
|
|
tmpvar_13.xy = xl_retval.texcoord.xy;
|
|
vec4 tmpvar_14;
|
|
tmpvar_14 = tmpvar_13;
|
|
gl_TexCoord[0] = tmpvar_14;
|
|
vec4 tmpvar_15;
|
|
tmpvar_15.zw = vec2(0.0, 0.0);
|
|
tmpvar_15.xy = xl_retval.texgencoord.xy;
|
|
vec4 tmpvar_16;
|
|
tmpvar_16 = tmpvar_15;
|
|
gl_TexCoord[1] = tmpvar_16;
|
|
}
|
|
|