bgfx/3rdparty/glsl-optimizer/tests/vertex/bug-swizzle-lhs-cast-outES3.txt

51 lines
1.6 KiB
Text
Raw Normal View History

2014-10-11 15:32:43 -04:00
#version 300 es
in vec4 _glesVertex;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _World2Object;
uniform highp vec3 _TerrainTreeLightDirections[4];
out highp vec3 xlv_TEXCOORD2;
void main ()
{
highp vec3 viewDir_1;
highp vec3 tmpvar_2;
highp vec4 tmpvar_3;
tmpvar_3.w = 1.0;
tmpvar_3.xyz = _WorldSpaceCameraPos;
viewDir_1 = normalize(((_World2Object * tmpvar_3).xyz - _glesVertex.xyz));
2015-04-03 02:30:48 -04:00
mediump float tmpvar_4;
2014-10-11 15:32:43 -04:00
highp float tmpvar_5;
tmpvar_5 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[0])), 0.0, 1.0);
2015-04-03 02:30:48 -04:00
tmpvar_4 = tmpvar_5;
2014-10-11 15:32:43 -04:00
highp vec3 tmpvar_6;
tmpvar_6.yz = tmpvar_2.yz;
2015-04-03 02:30:48 -04:00
tmpvar_6.x = (tmpvar_4 * 2.0);
mediump float tmpvar_7;
2014-10-11 15:32:43 -04:00
highp float tmpvar_8;
tmpvar_8 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[1])), 0.0, 1.0);
2015-04-03 02:30:48 -04:00
tmpvar_7 = tmpvar_8;
2014-10-11 15:32:43 -04:00
highp vec3 tmpvar_9;
tmpvar_9.xz = tmpvar_6.xz;
2015-04-03 02:30:48 -04:00
tmpvar_9.y = (tmpvar_7 * 2.0);
mediump float tmpvar_10;
2014-10-11 15:32:43 -04:00
highp float tmpvar_11;
tmpvar_11 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[2])), 0.0, 1.0);
2015-04-03 02:30:48 -04:00
tmpvar_10 = tmpvar_11;
2014-10-11 15:32:43 -04:00
highp vec3 tmpvar_12;
tmpvar_12.xy = tmpvar_9.xy;
2015-04-03 02:30:48 -04:00
tmpvar_12.z = (tmpvar_10 * 2.0);
2014-10-11 15:32:43 -04:00
tmpvar_2 = tmpvar_12;
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_TEXCOORD2 = tmpvar_12;
}
// stats: 17 alu 0 tex 0 flow
// inputs: 1
// #0: _glesVertex (high float) 4x1 [-1]
// uniforms: 4 (total size: 0)
// #0: _WorldSpaceCameraPos (high float) 3x1 [-1]
// #1: glstate_matrix_mvp (high float) 4x4 [-1]
// #2: _World2Object (high float) 4x4 [-1]
// #3: _TerrainTreeLightDirections (high float) 3x1 [4]