bgfx/3rdparty/glsl-optimizer/tests/vertex/z-particle-inES.txt

34 lines
894 B
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
struct v2f {
highp vec4 vertex;
lowp vec4 color;
mediump vec2 texcoord;
};
struct appdata_t {
highp vec4 vertex;
lowp vec4 color;
highp vec2 texcoord;
};
uniform highp vec4 _MainTex_ST;
uniform highp 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 lowp vec4 xlv_COLOR;
varying mediump vec2 xlv_TEXCOORD0;
void main() {
v2f xl_retval;
appdata_t xlt_v;
2014-02-11 02:06:13 -05:00
xlt_v.vertex = vec4( gl_Vertex);
xlt_v.color = vec4( gl_Color);
xlt_v.texcoord = vec2( gl_MultiTexCoord0);
2012-04-03 23:30:07 -04:00
xl_retval = xlat_main( xlt_v);
2014-02-11 02:06:13 -05:00
gl_Position = vec4( xl_retval.vertex);
xlv_COLOR = vec4( xl_retval.color);
xlv_TEXCOORD0 = vec2( xl_retval.texcoord);
2012-04-03 23:30:07 -04:00
}