mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
103 lines
3.1 KiB
Text
103 lines
3.1 KiB
Text
uniform vec4 _Color;
|
|
uniform vec4 _LightShadowData;
|
|
uniform vec4 _MainTex_ST;
|
|
uniform mat4 _Object2World;
|
|
uniform vec4 _Scale;
|
|
uniform float _SquashAmount;
|
|
uniform vec4 _SquashPlaneNormal;
|
|
uniform float _TimeX;
|
|
uniform vec4 _Wind;
|
|
uniform mat4 _World2Shadow;
|
|
uniform mat4 _World2Shadow1;
|
|
uniform mat4 _World2Shadow2;
|
|
uniform mat4 _World2Shadow3;
|
|
attribute vec4 TANGENT;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
vec4 tmpvar_2;
|
|
float tmpvar_3;
|
|
tmpvar_3 = (1.0 - abs(TANGENT.w));
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.w = 0.0;
|
|
tmpvar_4.xyz = gl_Normal;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = (gl_Vertex + ((TANGENT * gl_ModelViewMatrixInverseTranspose) * tmpvar_3));
|
|
tmpvar_2.w = tmpvar_5.w;
|
|
tmpvar_2.xyz = (tmpvar_5.xyz * _Scale.xyz);
|
|
vec4 pos_6;
|
|
pos_6.w = tmpvar_2.w;
|
|
vec3 bend_7;
|
|
float tmpvar_8;
|
|
tmpvar_8 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + gl_Color.x);
|
|
vec2 tmpvar_9;
|
|
tmpvar_9.x = dot (tmpvar_2.xyz, vec3((gl_Color.y + tmpvar_8)));
|
|
tmpvar_9.y = tmpvar_8;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = abs(((
|
|
fract((((
|
|
fract(((_TimeX + tmpvar_9).xxyy * vec4(1.975, 0.793, 0.375, 0.193)))
|
|
* 2.0) - 1.0) + 0.5))
|
|
* 2.0) - 1.0));
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = ((tmpvar_10 * tmpvar_10) * (3.0 - (2.0 * tmpvar_10)));
|
|
vec2 tmpvar_12;
|
|
tmpvar_12 = (tmpvar_11.xz + tmpvar_11.yw);
|
|
bend_7.xz = ((gl_Color.y * 0.1) * mix (gl_Normal, normalize(
|
|
(tmpvar_4 * gl_ModelViewMatrixInverseTranspose)
|
|
).xyz, vec3(tmpvar_3))).xz;
|
|
bend_7.y = (gl_MultiTexCoord1.y * 0.3);
|
|
pos_6.xyz = (tmpvar_2.xyz + ((
|
|
(tmpvar_12.xyx * bend_7)
|
|
+
|
|
((_Wind.xyz * tmpvar_12.y) * gl_MultiTexCoord1.y)
|
|
) * _Wind.w));
|
|
pos_6.xyz = (pos_6.xyz + (gl_MultiTexCoord1.x * _Wind.xyz));
|
|
vec3 tmpvar_13;
|
|
tmpvar_13.xz = vec2(0.0, 0.0);
|
|
tmpvar_13.y = _SquashPlaneNormal.w;
|
|
vec4 tmpvar_14;
|
|
tmpvar_14.w = 1.0;
|
|
tmpvar_14.xyz = mix ((pos_6.xyz + (
|
|
dot (_SquashPlaneNormal.xyz, (tmpvar_13 - pos_6.xyz))
|
|
* _SquashPlaneNormal.xyz)), pos_6.xyz, vec3(_SquashAmount));
|
|
tmpvar_2 = tmpvar_14;
|
|
vec4 tmpvar_15;
|
|
tmpvar_15.xyz = (gl_Color.w * _Color.xyz);
|
|
tmpvar_15.w = _Color.w;
|
|
float tmpvar_16;
|
|
tmpvar_16 = -((gl_ModelViewMatrix * tmpvar_14).z);
|
|
tmpvar_1.x = tmpvar_16;
|
|
tmpvar_1.y = ((tmpvar_16 * _LightShadowData.z) + _LightShadowData.w);
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = (_Object2World * tmpvar_14);
|
|
gl_Position = (gl_ModelViewProjectionMatrix * tmpvar_14);
|
|
vec4 tmpvar_18;
|
|
tmpvar_18.w = 0.0;
|
|
tmpvar_18.xyz = (_World2Shadow * tmpvar_17).xyz;
|
|
gl_TexCoord[0] = tmpvar_18;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19.w = 0.0;
|
|
tmpvar_19.xyz = (_World2Shadow1 * tmpvar_17).xyz;
|
|
gl_TexCoord[1] = tmpvar_19;
|
|
vec4 tmpvar_20;
|
|
tmpvar_20.w = 0.0;
|
|
tmpvar_20.xyz = (_World2Shadow2 * tmpvar_17).xyz;
|
|
gl_TexCoord[2] = tmpvar_20;
|
|
vec4 tmpvar_21;
|
|
tmpvar_21.w = 0.0;
|
|
tmpvar_21.xyz = (_World2Shadow3 * tmpvar_17).xyz;
|
|
gl_TexCoord[3] = tmpvar_21;
|
|
vec4 tmpvar_22;
|
|
tmpvar_22.zw = vec2(0.0, 0.0);
|
|
tmpvar_22.xy = tmpvar_1;
|
|
gl_TexCoord[4] = tmpvar_22;
|
|
vec4 tmpvar_23;
|
|
tmpvar_23.zw = vec2(0.0, 0.0);
|
|
tmpvar_23.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
gl_TexCoord[5] = tmpvar_23;
|
|
gl_FrontColor = tmpvar_15;
|
|
}
|
|
|
|
|
|
// inputs: 6, stats: 66 alu 0 tex 0 flow
|