mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
109 lines
4.1 KiB
Text
109 lines
4.1 KiB
Text
varying highp vec2 xlv_TEXCOORD3;
|
|
varying highp vec3 xlv_TEXCOORD2;
|
|
varying highp vec3 xlv_TEXCOORD1;
|
|
varying highp vec4 xlv_COLOR0;
|
|
varying highp vec2 xlv_TEXCOORD0;
|
|
attribute vec4 TANGENT;
|
|
uniform highp vec4 unity_Scale;
|
|
uniform highp mat4 glstate_matrix_mvp;
|
|
uniform highp mat4 glstate_matrix_invtrans_modelview0;
|
|
uniform highp vec4 _WorldSpaceLightPos0;
|
|
uniform highp vec3 _WorldSpaceCameraPos;
|
|
uniform highp mat4 _World2Object;
|
|
uniform highp vec4 _Wind;
|
|
uniform highp vec4 _Time;
|
|
uniform highp vec4 _SquashPlaneNormal;
|
|
uniform highp float _SquashAmount;
|
|
uniform highp vec4 _Scale;
|
|
uniform highp mat4 _Object2World;
|
|
uniform highp vec4 _MainTex_ST;
|
|
uniform highp mat4 _LightMatrix0;
|
|
attribute lowp vec4 _glesColor;
|
|
attribute highp vec4 _glesMultiTexCoord1;
|
|
attribute highp vec4 _glesMultiTexCoord0;
|
|
attribute mediump vec3 _glesNormal;
|
|
attribute highp vec4 _glesVertex;
|
|
void main ()
|
|
{
|
|
highp vec3 tmpvar_1;
|
|
tmpvar_1 = _glesNormal;
|
|
highp vec4 tmpvar_2;
|
|
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;
|
|
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));
|
|
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);
|
|
pos_13.xyz = (tmpvar_3.xyz + (((tmpvar_19.xyx * bend_14) + ((_Wind.xyz * tmpvar_19.y) * _glesMultiTexCoord1.y)) * _Wind.w));
|
|
pos_13.xyz = (pos_13.xyz + (_glesMultiTexCoord1.x * _Wind.xyz));
|
|
highp vec3 tmpvar_20;
|
|
tmpvar_20 = mix ((pos_13.xyz - ((dot (_SquashPlaneNormal.xyz, pos_13.xyz) + _SquashPlaneNormal.w) * _SquashPlaneNormal.xyz)), pos_13.xyz, vec3(_SquashAmount));
|
|
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);
|
|
xlv_TEXCOORD2 = (tmpvar_25 * (((_World2Object * tmpvar_26).xyz * unity_Scale.w) - tmpvar_20));
|
|
xlv_TEXCOORD3 = (_LightMatrix0 * (_Object2World * tmpvar_21)).xy;
|
|
}
|
|
|