bgfx/3rdparty/glsl-optimizer/tests/vertex/opt-matrix-transpose-mul-outES.txt

71 lines
2.2 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
uniform mat4 glstate_matrix_mvp;
2014-02-11 02:06:13 -05:00
attribute vec4 attrVertex;
attribute vec3 attrNormal;
attribute vec4 attrTangent;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec3 _WorldSpaceCameraPos;
uniform lowp vec4 _WorldSpaceLightPos0;
uniform highp vec4 unity_Scale;
varying lowp vec3 varWorldN;
varying lowp vec3 varLightDir;
varying lowp vec3 varViewDir;
2012-04-03 23:30:07 -04:00
void main ()
{
lowp vec3 tmpvar_1;
lowp vec3 tmpvar_2;
lowp vec3 tmpvar_3;
2014-10-11 15:32:43 -04:00
highp mat3 tmpvar_4;
2012-04-03 23:30:07 -04:00
tmpvar_4[0] = _Object2World[0].xyz;
tmpvar_4[1] = _Object2World[1].xyz;
tmpvar_4[2] = _Object2World[2].xyz;
highp vec3 tmpvar_5;
tmpvar_5 = (tmpvar_4 * attrNormal);
tmpvar_3 = tmpvar_5;
2012-10-07 23:41:18 -04:00
highp vec3 tmpvar_6;
highp vec3 tmpvar_7;
2014-10-11 15:32:43 -04:00
highp vec3 tmpvar_8;
2012-10-07 23:41:18 -04:00
tmpvar_6 = attrTangent.xyz;
tmpvar_7 = (((attrNormal.yzx * attrTangent.zxy) - (attrNormal.zxy * attrTangent.yzx)) * attrTangent.w);
2014-10-11 15:32:43 -04:00
tmpvar_8 = attrNormal;
highp mat3 tmpvar_9;
tmpvar_9[0].x = tmpvar_6.x;
tmpvar_9[0].y = tmpvar_7.x;
tmpvar_9[0].z = tmpvar_8.x;
tmpvar_9[1].x = tmpvar_6.y;
tmpvar_9[1].y = tmpvar_7.y;
tmpvar_9[1].z = tmpvar_8.y;
tmpvar_9[2].x = tmpvar_6.z;
tmpvar_9[2].y = tmpvar_7.z;
tmpvar_9[2].z = tmpvar_8.z;
highp vec3 tmpvar_10;
tmpvar_10 = (tmpvar_9 * (_World2Object * _WorldSpaceLightPos0).xyz);
tmpvar_1 = tmpvar_10;
highp vec4 tmpvar_11;
tmpvar_11.w = 1.0;
tmpvar_11.xyz = _WorldSpaceCameraPos;
highp vec3 tmpvar_12;
tmpvar_12 = normalize((tmpvar_10 + normalize(
(tmpvar_9 * (((_World2Object * tmpvar_11).xyz * unity_Scale.w) - attrVertex.xyz))
2014-02-11 02:06:13 -05:00
)));
2014-10-11 15:32:43 -04:00
tmpvar_2 = tmpvar_12;
2012-04-03 23:30:07 -04:00
gl_Position = (glstate_matrix_mvp * attrVertex);
varWorldN = tmpvar_3;
varLightDir = tmpvar_1;
varViewDir = tmpvar_2;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 16 alu 0 tex 0 flow
// inputs: 3
// #0: attrVertex (high float) 4x1 [-1]
// #1: attrNormal (high float) 3x1 [-1]
// #2: attrTangent (high float) 4x1 [-1]
// uniforms: 6 (total size: 0)
// #0: glstate_matrix_mvp (high float) 4x4 [-1]
// #1: _Object2World (high float) 4x4 [-1]
// #2: _World2Object (high float) 4x4 [-1]
// #3: _WorldSpaceCameraPos (high float) 3x1 [-1]
// #4: _WorldSpaceLightPos0 (low float) 4x1 [-1]
// #5: unity_Scale (high float) 4x1 [-1]