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

64 lines
2.3 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
varying vec4 xlv_FOG;
uniform vec4 unity_Scale;
uniform vec4 _WorldSpaceLightPos0;
uniform vec4 _WavingTint;
uniform vec4 _WaveAndDistance;
uniform mat4 _Object2World;
uniform vec4 _MainTex_ST;
uniform mat4 _LightMatrix0;
void main ()
{
vec4 vertex_1;
vertex_1.yw = gl_Vertex.yw;
vec4 outColor_2;
vec3 waveMove_3;
waveMove_3.y = 0.0;
vec4 tmpvar_4;
tmpvar_4 = ((fract((((gl_Vertex.x * (vec4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y)) + (gl_Vertex.z * (vec4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y))) + (_WaveAndDistance.x * vec4(1.2, 2.0, 1.6, 4.8)))) * 6.40885) - 3.14159);
vec4 tmpvar_5;
tmpvar_5 = (tmpvar_4 * tmpvar_4);
vec4 tmpvar_6;
tmpvar_6 = (tmpvar_5 * tmpvar_4);
vec4 tmpvar_7;
tmpvar_7 = (tmpvar_6 * tmpvar_5);
vec4 tmpvar_8;
tmpvar_8 = (((tmpvar_4 + (tmpvar_6 * -0.161616)) + (tmpvar_7 * 0.0083333)) + ((tmpvar_7 * tmpvar_5) * -0.00019841));
vec4 tmpvar_9;
tmpvar_9 = (tmpvar_8 * tmpvar_8);
vec4 tmpvar_10;
tmpvar_10 = (tmpvar_9 * tmpvar_9);
vec4 tmpvar_11;
tmpvar_11 = (tmpvar_10 * (gl_Color.w * _WaveAndDistance.z));
waveMove_3.x = dot (tmpvar_11, vec4(0.024, 0.04, -0.12, 0.096));
waveMove_3.z = dot (tmpvar_11, vec4(0.006, 0.02, -0.02, 0.1));
vertex_1.xz = (gl_Vertex.xz - (waveMove_3.xz * _WaveAndDistance.z));
outColor_2.xyz = ((gl_Color.xyz * mix (vec3(0.5, 0.5, 0.5), _WavingTint.xyz, vec3((dot (tmpvar_10, normalize(vec4(1.0, 1.0, 0.4, 0.2))) * 0.7)))) * 2.0);
outColor_2.w = 1.0;
vec4 tmpvar_12;
tmpvar_12 = (gl_ModelViewProjectionMatrix * vertex_1);
mat3 tmpvar_13;
tmpvar_13[0] = _Object2World[0].xyz;
tmpvar_13[1] = _Object2World[1].xyz;
tmpvar_13[2] = _Object2World[2].xyz;
gl_Position = tmpvar_12;
vec4 tmpvar_14;
tmpvar_14.yzw = vec3(0.0, 0.0, 0.0);
tmpvar_14.x = tmpvar_12.z;
xlv_FOG = tmpvar_14;
vec4 tmpvar_15;
tmpvar_15.zw = vec2(0.0, 0.0);
tmpvar_15.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
gl_TexCoord[0] = tmpvar_15;
gl_FrontColor = outColor_2;
vec4 tmpvar_16;
tmpvar_16.w = 0.0;
tmpvar_16.xyz = (tmpvar_13 * (gl_Normal * unity_Scale.w));
gl_TexCoord[1] = tmpvar_16;
vec4 tmpvar_17;
tmpvar_17.w = 0.0;
tmpvar_17.xyz = (_WorldSpaceLightPos0.xyz - (_Object2World * vertex_1).xyz);
gl_TexCoord[2] = tmpvar_17;
gl_TexCoord[3] = (_LightMatrix0 * (_Object2World * vertex_1));
}