bgfx/3rdparty/glsl-optimizer/tests/vertex/unity-Reflective_Bumped_Specular1-out.txt

48 lines
1.5 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
attribute vec4 TANGENT;
uniform vec4 _BumpMap_ST;
void main ()
{
vec3 tmpvar_1;
tmpvar_1 = (cross (gl_Normal, TANGENT.xyz) * TANGENT.w);
mat3 tmpvar_2;
tmpvar_2[0].x = TANGENT.x;
tmpvar_2[0].y = tmpvar_1.x;
tmpvar_2[0].z = gl_Normal.x;
tmpvar_2[1].x = TANGENT.y;
tmpvar_2[1].y = tmpvar_1.y;
tmpvar_2[1].z = gl_Normal.y;
tmpvar_2[2].x = TANGENT.z;
tmpvar_2[2].y = tmpvar_1.z;
tmpvar_2[2].z = gl_Normal.z;
mat3 tmpvar_3;
tmpvar_3[0] = gl_ModelViewMatrixInverseTranspose[0].xyz;
tmpvar_3[1] = gl_ModelViewMatrixInverseTranspose[1].xyz;
tmpvar_3[2] = gl_ModelViewMatrixInverseTranspose[2].xyz;
mat3 tmpvar_4;
tmpvar_4[0] = gl_ModelViewMatrixInverseTranspose[0].xyz;
tmpvar_4[1] = gl_ModelViewMatrixInverseTranspose[1].xyz;
tmpvar_4[2] = gl_ModelViewMatrixInverseTranspose[2].xyz;
mat3 tmpvar_5;
tmpvar_5[0] = gl_ModelViewMatrixInverseTranspose[0].xyz;
tmpvar_5[1] = gl_ModelViewMatrixInverseTranspose[1].xyz;
tmpvar_5[2] = gl_ModelViewMatrixInverseTranspose[2].xyz;
gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex);
vec4 tmpvar_6;
tmpvar_6.zw = vec2(0.0, 0.0);
tmpvar_6.xy = ((gl_MultiTexCoord0.xy * _BumpMap_ST.xy) + _BumpMap_ST.zw);
gl_TexCoord[0] = tmpvar_6;
vec4 tmpvar_7;
tmpvar_7.w = 0.0;
tmpvar_7.xyz = (tmpvar_2 * tmpvar_3[0]);
gl_TexCoord[1] = tmpvar_7;
vec4 tmpvar_8;
tmpvar_8.w = 0.0;
tmpvar_8.xyz = (tmpvar_2 * tmpvar_4[1]);
gl_TexCoord[2] = tmpvar_8;
vec4 tmpvar_9;
tmpvar_9.w = 0.0;
tmpvar_9.xyz = (tmpvar_2 * tmpvar_5[2]);
gl_TexCoord[3] = tmpvar_9;
}