bgfx/3rdparty/glsl-optimizer/tests/vertex/z-treeleaf-outES.txt

124 lines
4.2 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
attribute highp vec4 _glesVertex;
2014-02-11 02:06:13 -05:00
attribute mediump vec3 _glesNormal;
attribute highp vec4 _glesMultiTexCoord0;
attribute highp vec4 _glesMultiTexCoord1;
attribute lowp vec4 _glesColor;
uniform highp mat4 _LightMatrix0;
uniform highp vec4 _MainTex_ST;
uniform highp mat4 _Object2World;
uniform highp vec4 _Scale;
uniform highp float _SquashAmount;
uniform highp vec4 _SquashPlaneNormal;
uniform highp vec4 _Time;
uniform highp vec4 _Wind;
uniform highp mat4 _World2Object;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_invtrans_modelview0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp vec4 unity_Scale;
attribute vec4 TANGENT;
varying highp vec2 xlv_TEXCOORD0;
varying highp vec4 xlv_COLOR0;
varying highp vec3 xlv_TEXCOORD1;
varying highp vec3 xlv_TEXCOORD2;
varying highp vec2 xlv_TEXCOORD3;
2012-10-07 23:41:18 -04:00
void main ()
{
highp vec3 tmpvar_1;
highp vec4 tmpvar_2;
2014-02-11 02:06:13 -05:00
tmpvar_1 = _glesNormal;
2012-10-07 23:41:18 -04:00
tmpvar_2 = _glesColor;
highp vec4 tmpvar_3;
highp vec4 tmpvar_4;
highp float tmpvar_5;
tmpvar_5 = (1.0 - abs(TANGENT.w));
highp vec4 tmpvar_6;
tmpvar_6.w = 0.0;
tmpvar_6.xyz = tmpvar_1;
highp vec4 tmpvar_7;
tmpvar_7.w = 0.0;
tmpvar_7.xyz = TANGENT.xyz;
highp vec4 tmpvar_8;
tmpvar_8.zw = vec2(0.0, 0.0);
tmpvar_8.xy = tmpvar_1.xy;
highp vec4 tmpvar_9;
tmpvar_9 = (_glesVertex + ((tmpvar_8 * glstate_matrix_invtrans_modelview0) * tmpvar_5));
highp vec3 tmpvar_10;
tmpvar_10 = mix (tmpvar_1, normalize((tmpvar_6 * glstate_matrix_invtrans_modelview0)).xyz, vec3(tmpvar_5));
highp vec4 tmpvar_11;
tmpvar_11.w = -1.0;
tmpvar_11.xyz = normalize((tmpvar_7 * glstate_matrix_invtrans_modelview0)).xyz;
highp vec4 tmpvar_12;
tmpvar_12 = mix (TANGENT, tmpvar_11, vec4(tmpvar_5));
tmpvar_3.w = tmpvar_9.w;
tmpvar_4.w = tmpvar_12.w;
tmpvar_3.xyz = (tmpvar_9.xyz * _Scale.xyz);
highp vec4 pos_13;
pos_13.w = tmpvar_3.w;
highp vec3 bend_14;
highp float tmpvar_15;
tmpvar_15 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + tmpvar_2.x);
highp vec2 tmpvar_16;
tmpvar_16.x = dot (tmpvar_3.xyz, vec3((tmpvar_2.y + tmpvar_15)));
tmpvar_16.y = tmpvar_15;
highp vec4 tmpvar_17;
2014-02-11 02:06:13 -05:00
tmpvar_17 = abs(((
fract((((
fract(((_Time.yy + tmpvar_16).xxyy * vec4(1.975, 0.793, 0.375, 0.193)))
* 2.0) - 1.0) + 0.5))
* 2.0) - 1.0));
2012-10-07 23:41:18 -04:00
highp vec4 tmpvar_18;
tmpvar_18 = ((tmpvar_17 * tmpvar_17) * (3.0 - (2.0 * tmpvar_17)));
highp vec2 tmpvar_19;
tmpvar_19 = (tmpvar_18.xz + tmpvar_18.yw);
bend_14.xz = ((tmpvar_2.y * 0.1) * tmpvar_10).xz;
bend_14.y = (_glesMultiTexCoord1.y * 0.3);
2014-02-11 02:06:13 -05:00
pos_13.xyz = (tmpvar_3.xyz + ((
(tmpvar_19.xyx * bend_14)
+
((_Wind.xyz * tmpvar_19.y) * _glesMultiTexCoord1.y)
) * _Wind.w));
2012-10-07 23:41:18 -04:00
pos_13.xyz = (pos_13.xyz + (_glesMultiTexCoord1.x * _Wind.xyz));
highp vec3 tmpvar_20;
2014-02-11 02:06:13 -05:00
tmpvar_20 = mix ((pos_13.xyz - (
(dot (_SquashPlaneNormal.xyz, pos_13.xyz) + _SquashPlaneNormal.w)
* _SquashPlaneNormal.xyz)), pos_13.xyz, vec3(_SquashAmount));
2012-10-07 23:41:18 -04:00
highp vec4 tmpvar_21;
tmpvar_21.w = 1.0;
tmpvar_21.xyz = tmpvar_20;
tmpvar_3 = tmpvar_21;
highp vec4 tmpvar_22;
tmpvar_22.xyz = vec3(1.0, 1.0, 1.0);
tmpvar_22.w = tmpvar_2.w;
highp vec3 tmpvar_23;
tmpvar_23 = normalize(tmpvar_10);
tmpvar_4.xyz = normalize(tmpvar_12.xyz);
highp vec3 tmpvar_24;
tmpvar_24 = (((tmpvar_23.yzx * tmpvar_4.zxy) - (tmpvar_23.zxy * tmpvar_4.yzx)) * tmpvar_12.w);
highp mat3 tmpvar_25;
tmpvar_25[0].x = tmpvar_4.x;
tmpvar_25[0].y = tmpvar_24.x;
tmpvar_25[0].z = tmpvar_23.x;
tmpvar_25[1].x = tmpvar_4.y;
tmpvar_25[1].y = tmpvar_24.y;
tmpvar_25[1].z = tmpvar_23.y;
tmpvar_25[2].x = tmpvar_4.z;
tmpvar_25[2].y = tmpvar_24.z;
tmpvar_25[2].z = tmpvar_23.z;
highp vec4 tmpvar_26;
tmpvar_26.w = 1.0;
tmpvar_26.xyz = _WorldSpaceCameraPos;
gl_Position = (glstate_matrix_mvp * tmpvar_21);
xlv_TEXCOORD0 = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
xlv_COLOR0 = tmpvar_22;
xlv_TEXCOORD1 = (tmpvar_25 * (_World2Object * _WorldSpaceLightPos0).xyz);
2014-02-11 02:06:13 -05:00
xlv_TEXCOORD2 = (tmpvar_25 * ((
(_World2Object * tmpvar_26)
.xyz * unity_Scale.w) - tmpvar_20));
2012-10-07 23:41:18 -04:00
xlv_TEXCOORD3 = (_LightMatrix0 * (_Object2World * tmpvar_21)).xy;
}
2014-02-11 02:06:13 -05:00
// inputs: 6, stats: 71 alu 0 tex 0 flow