bgfx/3rdparty/glsl-optimizer/tests/vertex/complex-particle-in.txt

34 lines
833 B
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
struct v2f {
vec4 vertex;
vec4 color;
vec2 texcoord;
};
struct appdata_t {
vec4 vertex;
vec4 color;
vec2 texcoord;
};
uniform vec4 _MainTex_ST;
uniform mat4 glstate_matrix_mvp;
v2f xlat_main( in appdata_t v );
v2f xlat_main( in appdata_t v ) {
v2f o;
o.vertex = ( glstate_matrix_mvp * v.vertex );
o.color = v.color;
o.texcoord = ((v.texcoord.xy * _MainTex_ST.xy ) + _MainTex_ST.zw );
return o;
}
varying vec4 xlv_COLOR;
varying vec2 xlv_TEXCOORD0;
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 = xlat_main( xlt_v);
gl_Position = vec4( xl_retval.vertex);
xlv_COLOR = vec4( xl_retval.color);
xlv_TEXCOORD0 = vec2( xl_retval.texcoord);
}