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

76 lines
2.4 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform mat4 _Object2World;
2014-02-11 02:06:13 -05:00
uniform vec4 _Scale;
uniform float _SquashAmount;
uniform vec4 _SquashPlaneNormal;
uniform float _TimeX;
uniform vec4 _Wind;
uniform vec4 unity_LightShadowBias;
2012-10-07 23:41:18 -04:00
void main ()
{
vec4 tmpvar_1;
vec4 tmpvar_2;
tmpvar_2.w = gl_Vertex.w;
tmpvar_2.xyz = (gl_Vertex.xyz * _Scale.xyz);
vec4 pos_3;
pos_3.w = tmpvar_2.w;
vec3 bend_4;
2014-10-11 15:32:43 -04:00
vec2 vWavesSum_5;
vec4 vWaves_6;
float fBranchPhase_7;
fBranchPhase_7 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + gl_Color.x);
vec2 tmpvar_8;
tmpvar_8.x = dot (tmpvar_2.xyz, vec3((gl_Color.y + fBranchPhase_7)));
tmpvar_8.y = fBranchPhase_7;
vWaves_6 = ((fract(
((_TimeX + tmpvar_8).xxyy * vec4(1.975, 0.793, 0.375, 0.193))
) * 2.0) - 1.0);
vec4 tmpvar_9;
tmpvar_9 = abs(((
fract((vWaves_6 + 0.5))
2014-02-11 02:06:13 -05:00
* 2.0) - 1.0));
2014-10-11 15:32:43 -04:00
vec4 tmpvar_10;
tmpvar_10 = ((tmpvar_9 * tmpvar_9) * (3.0 - (2.0 * tmpvar_9)));
vWaves_6 = tmpvar_10;
vWavesSum_5 = (tmpvar_10.xz + tmpvar_10.yw);
2012-10-07 23:41:18 -04:00
bend_4.xz = ((gl_Color.y * 0.1) * gl_Normal).xz;
bend_4.y = (gl_MultiTexCoord1.y * 0.3);
2014-02-11 02:06:13 -05:00
pos_3.xyz = (tmpvar_2.xyz + ((
2014-10-11 15:32:43 -04:00
(vWavesSum_5.xyx * bend_4)
2014-02-11 02:06:13 -05:00
+
2014-10-11 15:32:43 -04:00
((_Wind.xyz * vWavesSum_5.y) * gl_MultiTexCoord1.y)
2014-02-11 02:06:13 -05:00
) * _Wind.w));
2012-10-07 23:41:18 -04:00
pos_3.xyz = (pos_3.xyz + (gl_MultiTexCoord1.x * _Wind.xyz));
2014-10-11 15:32:43 -04:00
vec3 tmpvar_11;
tmpvar_11.xz = vec2(0.0, 0.0);
tmpvar_11.y = _SquashPlaneNormal.w;
2012-10-07 23:41:18 -04:00
vec4 tmpvar_12;
2014-10-11 15:32:43 -04:00
tmpvar_12.w = 1.0;
tmpvar_12.xyz = mix ((pos_3.xyz + (
dot (_SquashPlaneNormal.xyz, (tmpvar_11 - pos_3.xyz))
* _SquashPlaneNormal.xyz)), pos_3.xyz, vec3(_SquashAmount));
tmpvar_2 = tmpvar_12;
tmpvar_1 = (gl_ModelViewProjectionMatrix * tmpvar_12);
tmpvar_1.z = (tmpvar_1.z + unity_LightShadowBias.x);
if ((tmpvar_1.z < -(tmpvar_1.w))) {
tmpvar_1.z = -(tmpvar_1.w);
2012-10-07 23:41:18 -04:00
};
gl_Position = tmpvar_1;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 43 alu 0 tex 1 flow
// inputs: 4
// #0: gl_MultiTexCoord1 (high float) 4x1 [-1] loc 9
// #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
// uniforms: 8 (total size: 0)
// #0: gl_ModelViewProjectionMatrix (high float) 4x4 [-1]
// #1: _Object2World (high float) 4x4 [-1]
// #2: _Scale (high float) 4x1 [-1]
// #3: _SquashAmount (high float) 1x1 [-1]
// #4: _SquashPlaneNormal (high float) 4x1 [-1]
// #5: _TimeX (high float) 1x1 [-1]
// #6: _Wind (high float) 4x1 [-1]
// #7: unity_LightShadowBias (high float) 4x1 [-1]