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

36 lines
1.2 KiB
Text

uniform mat4 _TerrainEngineBendTree;
uniform vec4 _SquashPlaneNormal;
uniform float _SquashAmount;
uniform vec4 _Scale;
uniform vec4 _ProjectionParams;
void main ()
{
vec4 tmpvar_1;
vec4 pos;
pos = gl_Vertex;
pos.xyz = (gl_Vertex.xyz * _Scale.xyz);
vec4 tmpvar_2;
tmpvar_2.w = 0.0;
tmpvar_2.xyz = pos.xyz;
pos.xyz = mix (pos.xyz, (_TerrainEngineBendTree * tmpvar_2).xyz, gl_Color.www);
vec3 tmpvar_3;
tmpvar_3.xz = vec2(0.0, 0.0);
tmpvar_3.y = _SquashPlaneNormal.w;
vec4 tmpvar_4;
tmpvar_4.w = 1.0;
tmpvar_4.xyz = mix ((pos.xyz + (dot (_SquashPlaneNormal.xyz, (tmpvar_3 - pos.xyz)) * _SquashPlaneNormal.xyz)), pos.xyz, vec3(_SquashAmount));
pos = tmpvar_4;
mat3 tmpvar_5;
tmpvar_5[0] = gl_ModelViewMatrixInverseTranspose[0].xyz;
tmpvar_5[1] = gl_ModelViewMatrixInverseTranspose[1].xyz;
tmpvar_5[2] = gl_ModelViewMatrixInverseTranspose[2].xyz;
tmpvar_1.xyz = (tmpvar_5 * gl_Normal);
tmpvar_1.w = -(((gl_ModelViewMatrix * tmpvar_4).z * _ProjectionParams.w));
gl_Position = (gl_ModelViewProjectionMatrix * tmpvar_4);
vec4 tmpvar_6;
tmpvar_6.zw = vec2(0.0, 0.0);
tmpvar_6.xy = gl_MultiTexCoord0.xy;
gl_TexCoord[0] = tmpvar_6;
gl_TexCoord[1] = tmpvar_1;
}