bgfx/3rdparty/glsl-optimizer/tests/vertex/unity-Hidden_Tree_Optimized_Bark_Shader1-out.txt
Branimir Karadzic dee3fe5266 Initial commit.
2012-04-03 20:30:07 -07:00

48 lines
1.6 KiB
Text

uniform vec4 unity_LightShadowBias;
uniform vec4 _Wind;
uniform float _TimeX;
uniform vec4 _SquashPlaneNormal;
uniform float _SquashAmount;
uniform vec4 _Scale;
uniform mat4 _Object2World;
void main ()
{
vec4 tmpvar_1;
vec4 tmpvar_2;
tmpvar_2 = gl_Vertex;
tmpvar_2.xyz = (gl_Vertex.xyz * _Scale.xyz);
vec4 pos;
pos = tmpvar_2;
vec3 bend;
float tmpvar_3;
tmpvar_3 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + gl_Color.x);
vec2 tmpvar_4;
tmpvar_4.x = dot (tmpvar_2.xyz, vec3((gl_Color.y + tmpvar_3)));
tmpvar_4.y = tmpvar_3;
vec4 tmpvar_5;
tmpvar_5 = abs (((fract ((((fract (((_TimeX + tmpvar_4).xxyy * vec4(1.975, 0.793, 0.375, 0.193))) * 2.0) - 1.0) + 0.5)) * 2.0) - 1.0));
vec4 tmpvar_6;
tmpvar_6 = ((tmpvar_5 * tmpvar_5) * (3.0 - (2.0 * tmpvar_5)));
vec2 tmpvar_7;
tmpvar_7 = (tmpvar_6.xz + tmpvar_6.yw);
bend = ((gl_Color.y * 0.1) * gl_Normal);
bend.y = (gl_MultiTexCoord1.y * 0.3);
pos.xyz = (tmpvar_2.xyz + (((tmpvar_7.xyx * bend) + ((_Wind.xyz * tmpvar_7.y) * gl_MultiTexCoord1.y)) * _Wind.w));
pos.xyz = (pos.xyz + (gl_MultiTexCoord1.x * _Wind.xyz));
vec3 tmpvar_8;
tmpvar_8.xz = vec2(0.0, 0.0);
tmpvar_8.y = _SquashPlaneNormal.w;
vec4 tmpvar_9;
tmpvar_9.w = 1.0;
tmpvar_9.xyz = mix ((pos.xyz + (dot (_SquashPlaneNormal.xyz, (tmpvar_8 - pos.xyz)) * _SquashPlaneNormal.xyz)), pos.xyz, vec3(_SquashAmount));
tmpvar_2 = tmpvar_9;
vec4 tmpvar_10;
tmpvar_10 = (gl_ModelViewProjectionMatrix * tmpvar_9);
tmpvar_1 = tmpvar_10;
tmpvar_1.z = (tmpvar_10.z + unity_LightShadowBias.x);
if ((tmpvar_1.z < -(tmpvar_10.w))) {
tmpvar_1.z = -(tmpvar_10.w);
};
gl_Position = tmpvar_1;
}