struct v2f_vertex_lit { vec2 uv; vec4 diff; vec4 spec; }; struct v2f_img { vec4 pos; vec2 uv; }; struct appdata_img { vec4 vertex; vec2 texcoord; }; 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 ); v2f vert( in appdata_t v ) { v2f o; vec4 texgen; o.vertex = ( gl_ModelViewProjectionMatrix * v.vertex ); texgen = ( gl_ModelViewMatrix * v.vertex ); o.texgencoord = vec2( ( _GUIClipTextureMatrix * texgen )); o.color = v.color; o.texcoord = ((v.texcoord.xy * _MainTex_ST.xy ) + _MainTex_ST.zw ); return o; } void main() { v2f xl_retval; appdata_t xlt_v; xlt_v.vertex = vec4( gl_Vertex); xlt_v.color = vec4( gl_Color); xlt_v.texcoord = vec2( gl_MultiTexCoord0); xl_retval = vert( xlt_v); gl_Position = vec4( xl_retval.vertex); gl_FrontColor = vec4( xl_retval.color); gl_TexCoord[0] = vec4( xl_retval.texcoord, 0.0, 0.0); gl_TexCoord[1] = vec4( xl_retval.texgencoord, 0.0, 0.0); }