mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
109 lines
4 KiB
Text
109 lines
4 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 = tmpvar_9;
|
|
tmpvar_4 = tmpvar_12;
|
|
tmpvar_3.xyz = (tmpvar_9.xyz * _Scale.xyz);
|
|
highp vec4 pos_i0;
|
|
pos_i0 = tmpvar_3;
|
|
highp vec3 bend;
|
|
highp float tmpvar_13;
|
|
tmpvar_13 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + tmpvar_2.x);
|
|
highp vec2 tmpvar_14;
|
|
tmpvar_14.x = dot (tmpvar_3.xyz, vec3((tmpvar_2.y + tmpvar_13)));
|
|
tmpvar_14.y = tmpvar_13;
|
|
highp vec4 tmpvar_15;
|
|
tmpvar_15 = abs (((fract ((((fract (((_Time.yy + tmpvar_14).xxyy * vec4(1.975, 0.793, 0.375, 0.193))) * 2.0) - 1.0) + 0.5)) * 2.0) - 1.0));
|
|
highp vec4 tmpvar_16;
|
|
tmpvar_16 = ((tmpvar_15 * tmpvar_15) * (3.0 - (2.0 * tmpvar_15)));
|
|
highp vec2 tmpvar_17;
|
|
tmpvar_17 = (tmpvar_16.xz + tmpvar_16.yw);
|
|
bend = ((tmpvar_2.y * 0.1) * tmpvar_10);
|
|
bend.y = (_glesMultiTexCoord1.y * 0.3);
|
|
pos_i0.xyz = (tmpvar_3.xyz + (((tmpvar_17.xyx * bend) + ((_Wind.xyz * tmpvar_17.y) * _glesMultiTexCoord1.y)) * _Wind.w));
|
|
pos_i0.xyz = (pos_i0.xyz + (_glesMultiTexCoord1.x * _Wind.xyz));
|
|
highp vec3 tmpvar_18;
|
|
tmpvar_18 = mix ((pos_i0.xyz - ((dot (_SquashPlaneNormal.xyz, pos_i0.xyz) + _SquashPlaneNormal.w) * _SquashPlaneNormal.xyz)), pos_i0.xyz, vec3(_SquashAmount));
|
|
highp vec4 tmpvar_19;
|
|
tmpvar_19.w = 1.0;
|
|
tmpvar_19.xyz = tmpvar_18;
|
|
tmpvar_3 = tmpvar_19;
|
|
highp vec4 tmpvar_20;
|
|
tmpvar_20.xyz = vec3(1.0, 1.0, 1.0);
|
|
tmpvar_20.w = tmpvar_2.w;
|
|
highp vec3 tmpvar_21;
|
|
tmpvar_21 = normalize (tmpvar_10);
|
|
tmpvar_4.xyz = normalize (tmpvar_12.xyz);
|
|
highp vec3 tmpvar_22;
|
|
tmpvar_22 = (cross (tmpvar_21, tmpvar_4.xyz) * tmpvar_12.w);
|
|
highp mat3 tmpvar_23;
|
|
tmpvar_23[0].x = tmpvar_4.x;
|
|
tmpvar_23[0].y = tmpvar_22.x;
|
|
tmpvar_23[0].z = tmpvar_21.x;
|
|
tmpvar_23[1].x = tmpvar_4.y;
|
|
tmpvar_23[1].y = tmpvar_22.y;
|
|
tmpvar_23[1].z = tmpvar_21.y;
|
|
tmpvar_23[2].x = tmpvar_4.z;
|
|
tmpvar_23[2].y = tmpvar_22.z;
|
|
tmpvar_23[2].z = tmpvar_21.z;
|
|
highp vec4 tmpvar_24;
|
|
tmpvar_24.w = 1.0;
|
|
tmpvar_24.xyz = _WorldSpaceCameraPos;
|
|
gl_Position = (glstate_matrix_mvp * tmpvar_19);
|
|
xlv_TEXCOORD0 = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
xlv_COLOR0 = tmpvar_20;
|
|
xlv_TEXCOORD1 = (tmpvar_23 * (_World2Object * _WorldSpaceLightPos0).xyz);
|
|
xlv_TEXCOORD2 = (tmpvar_23 * (((_World2Object * tmpvar_24).xyz * unity_Scale.w) - tmpvar_18));
|
|
xlv_TEXCOORD3 = (_LightMatrix0 * (_Object2World * tmpvar_19)).xy;
|
|
}
|
|
|