bgfx/3rdparty/glsl-optimizer/tests/vertex/zun-Hidden_Tree_Leaf_Shader_Rendertex-out.txt

54 lines
2 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform vec4 _TerrainTreeLightColors[4];
2014-02-11 02:06:13 -05:00
uniform vec3 _TerrainTreeLightDirections[4];
attribute vec4 TANGENT;
2012-10-07 23:41:18 -04:00
void main ()
{
vec3 lightColor_1;
2014-10-11 15:32:43 -04:00
float isBillboard_2;
isBillboard_2 = (1.0 - abs(TANGENT.w));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_3;
tmpvar_3.w = 0.0;
tmpvar_3.xyz = gl_Normal;
vec3 tmpvar_4;
2014-10-11 15:32:43 -04:00
tmpvar_4 = mix (gl_Normal, normalize((tmpvar_3 * gl_ModelViewMatrixInverseTranspose)).xyz, vec3(isBillboard_2));
2012-10-07 23:41:18 -04:00
lightColor_1 = gl_LightModel.ambient.xyz;
2014-02-11 02:06:13 -05:00
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[0] * max (0.0,
((dot (_TerrainTreeLightDirections[0], tmpvar_4) * 0.5) + 0.5)
)).xyz);
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[1] * max (0.0,
((dot (_TerrainTreeLightDirections[1], tmpvar_4) * 0.5) + 0.5)
)).xyz);
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[2] * max (0.0,
((dot (_TerrainTreeLightDirections[2], tmpvar_4) * 0.5) + 0.5)
)).xyz);
lightColor_1 = (lightColor_1 + (_TerrainTreeLightColors[3] * max (0.0,
((dot (_TerrainTreeLightDirections[3], tmpvar_4) * 0.5) + 0.5)
)).xyz);
gl_Position = (gl_ModelViewProjectionMatrix * (gl_Vertex + (
(TANGENT * gl_ModelViewMatrixInverseTranspose)
2014-10-11 15:32:43 -04:00
* isBillboard_2)));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_5;
tmpvar_5.zw = vec2(0.0, 0.0);
tmpvar_5.xy = gl_MultiTexCoord0.xy;
gl_TexCoord[0] = tmpvar_5;
vec4 tmpvar_6;
tmpvar_6.w = 0.0;
tmpvar_6.xyz = (lightColor_1 * gl_Color.w);
gl_TexCoord[1] = tmpvar_6;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 37 alu 0 tex 0 flow
// inputs: 5
// #0: gl_MultiTexCoord0 (high float) 4x1 [-1] loc 8
// #1: gl_Color (high float) 4x1 [-1] loc 3
// #2: gl_Normal (high float) 3x1 [-1] loc 2
// #3: gl_Vertex (high float) 4x1 [-1] loc 0
// #4: TANGENT (high float) 4x1 [-1]
// uniforms: 5 (total size: 0)
// #0: gl_LightModel (high other) 0x0 [-1]
// #1: gl_ModelViewMatrixInverseTranspose (high float) 4x4 [-1]
// #2: gl_ModelViewProjectionMatrix (high float) 4x4 [-1]
// #3: _TerrainTreeLightColors (high float) 4x1 [4]
// #4: _TerrainTreeLightDirections (high float) 3x1 [4]