bgfx/3rdparty/glsl-optimizer/tests/vertex/unity-Grab_Invert-ir.txt
Branimir Karadzic dee3fe5266 Initial commit.
2012-04-03 20:30:07 -07:00

53 lines
1,011 B
Text

struct v2f {
vec4 vertex;
vec4 uv;
};
v2f vert (
in vec4 vertex,
in vec2 uv
)
{
float scale;
v2f o;
float tmpvar_1;
tmpvar_1 = 1.0;
scale = tmpvar_1;
vec4 tmpvar_2;
tmpvar_2 = (gl_ModelViewProjectionMatrix * vertex);
o.vertex = tmpvar_2;
vec2 tmpvar_3;
tmpvar_3.x = o.vertex.x;
tmpvar_3.y = (o.vertex.y * scale);
vec2 tmpvar_4;
tmpvar_4 = ((tmpvar_3 + o.vertex.w) * 0.5);
o.uv.xy = tmpvar_4.xy.xy;
vec2 tmpvar_5;
tmpvar_5 = o.vertex.zw;
o.uv.zw = tmpvar_5.xxxy.zw;
return o;
}
void main ()
{
v2f xl_retval;
vec4 tmpvar_1;
tmpvar_1 = gl_Vertex.xyzw;
vec2 tmpvar_2;
tmpvar_2 = gl_MultiTexCoord0.xy;
v2f tmpvar_3;
tmpvar_3 = vert (tmpvar_1, tmpvar_2);
v2f tmpvar_4;
tmpvar_4 = tmpvar_3;
xl_retval = tmpvar_4;
vec4 tmpvar_5;
tmpvar_5 = xl_retval.vertex.xyzw;
vec4 tmpvar_6;
tmpvar_6 = tmpvar_5;
gl_Position = tmpvar_6;
vec4 tmpvar_7;
tmpvar_7 = xl_retval.uv.xyzw;
vec4 tmpvar_8;
tmpvar_8 = tmpvar_7;
gl_TexCoord[0] = tmpvar_8;
}