mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
112 lines
3.3 KiB
Text
112 lines
3.3 KiB
Text
uniform vec4 _Color;
|
|
uniform mat4 _LightMatrix0;
|
|
uniform vec4 _MainTex_ST;
|
|
uniform mat4 _Object2World;
|
|
uniform vec4 _Scale;
|
|
uniform float _SquashAmount;
|
|
uniform vec4 _SquashPlaneNormal;
|
|
uniform float _TimeX;
|
|
uniform vec4 _Wind;
|
|
uniform mat4 _World2Object;
|
|
uniform vec3 _WorldSpaceCameraPos;
|
|
uniform vec4 _WorldSpaceLightPos0;
|
|
uniform vec4 unity_Scale;
|
|
attribute vec4 TANGENT;
|
|
varying vec4 xlv_FOG;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_1.w = gl_Vertex.w;
|
|
tmpvar_2.w = TANGENT.w;
|
|
tmpvar_1.xyz = (gl_Vertex.xyz * _Scale.xyz);
|
|
vec4 pos_3;
|
|
pos_3.w = tmpvar_1.w;
|
|
vec3 bend_4;
|
|
float tmpvar_5;
|
|
tmpvar_5 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + gl_Color.x);
|
|
vec2 tmpvar_6;
|
|
tmpvar_6.x = dot (tmpvar_1.xyz, vec3((gl_Color.y + tmpvar_5)));
|
|
tmpvar_6.y = tmpvar_5;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = abs(((
|
|
fract((((
|
|
fract(((_TimeX + tmpvar_6).xxyy * vec4(1.975, 0.793, 0.375, 0.193)))
|
|
* 2.0) - 1.0) + 0.5))
|
|
* 2.0) - 1.0));
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = ((tmpvar_7 * tmpvar_7) * (3.0 - (2.0 * tmpvar_7)));
|
|
vec2 tmpvar_9;
|
|
tmpvar_9 = (tmpvar_8.xz + tmpvar_8.yw);
|
|
bend_4.xz = ((gl_Color.y * 0.1) * gl_Normal).xz;
|
|
bend_4.y = (gl_MultiTexCoord1.y * 0.3);
|
|
pos_3.xyz = (tmpvar_1.xyz + ((
|
|
(tmpvar_9.xyx * bend_4)
|
|
+
|
|
((_Wind.xyz * tmpvar_9.y) * gl_MultiTexCoord1.y)
|
|
) * _Wind.w));
|
|
pos_3.xyz = (pos_3.xyz + (gl_MultiTexCoord1.x * _Wind.xyz));
|
|
vec3 tmpvar_10;
|
|
tmpvar_10.xz = vec2(0.0, 0.0);
|
|
tmpvar_10.y = _SquashPlaneNormal.w;
|
|
vec3 tmpvar_11;
|
|
tmpvar_11 = mix ((pos_3.xyz + (
|
|
dot (_SquashPlaneNormal.xyz, (tmpvar_10 - pos_3.xyz))
|
|
* _SquashPlaneNormal.xyz)), pos_3.xyz, vec3(_SquashAmount));
|
|
vec4 tmpvar_12;
|
|
tmpvar_12.w = 1.0;
|
|
tmpvar_12.xyz = tmpvar_11;
|
|
tmpvar_1 = tmpvar_12;
|
|
vec4 tmpvar_13;
|
|
tmpvar_13.xyz = (gl_Color.w * _Color.xyz);
|
|
tmpvar_13.w = _Color.w;
|
|
vec3 tmpvar_14;
|
|
tmpvar_14 = normalize(gl_Normal);
|
|
tmpvar_2.xyz = normalize(TANGENT.xyz);
|
|
vec4 tmpvar_15;
|
|
tmpvar_15 = (gl_ModelViewProjectionMatrix * tmpvar_12);
|
|
vec3 tmpvar_16;
|
|
tmpvar_16 = (((tmpvar_14.yzx * tmpvar_2.zxy) - (tmpvar_14.zxy * tmpvar_2.yzx)) * TANGENT.w);
|
|
mat3 tmpvar_17;
|
|
tmpvar_17[0].x = tmpvar_2.x;
|
|
tmpvar_17[0].y = tmpvar_16.x;
|
|
tmpvar_17[0].z = tmpvar_14.x;
|
|
tmpvar_17[1].x = tmpvar_2.y;
|
|
tmpvar_17[1].y = tmpvar_16.y;
|
|
tmpvar_17[1].z = tmpvar_14.y;
|
|
tmpvar_17[2].x = tmpvar_2.z;
|
|
tmpvar_17[2].y = tmpvar_16.z;
|
|
tmpvar_17[2].z = tmpvar_14.z;
|
|
vec4 tmpvar_18;
|
|
tmpvar_18.w = 1.0;
|
|
tmpvar_18.xyz = _WorldSpaceCameraPos;
|
|
gl_Position = tmpvar_15;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19.yzw = vec3(0.0, 0.0, 0.0);
|
|
tmpvar_19.x = tmpvar_15.z;
|
|
xlv_FOG = tmpvar_19;
|
|
vec4 tmpvar_20;
|
|
tmpvar_20.zw = vec2(0.0, 0.0);
|
|
tmpvar_20.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
gl_TexCoord[0] = tmpvar_20;
|
|
gl_FrontColor = tmpvar_13;
|
|
vec4 tmpvar_21;
|
|
tmpvar_21.w = 0.0;
|
|
tmpvar_21.xyz = (tmpvar_17 * ((
|
|
(_World2Object * _WorldSpaceLightPos0)
|
|
.xyz * unity_Scale.w) - tmpvar_11));
|
|
gl_TexCoord[1] = tmpvar_21;
|
|
vec4 tmpvar_22;
|
|
tmpvar_22.w = 0.0;
|
|
tmpvar_22.xyz = (tmpvar_17 * ((
|
|
(_World2Object * tmpvar_18)
|
|
.xyz * unity_Scale.w) - tmpvar_11));
|
|
gl_TexCoord[2] = tmpvar_22;
|
|
vec4 tmpvar_23;
|
|
tmpvar_23.w = 0.0;
|
|
tmpvar_23.xyz = (_LightMatrix0 * (_Object2World * tmpvar_12)).xyz;
|
|
gl_TexCoord[3] = tmpvar_23;
|
|
}
|
|
|
|
|
|
// inputs: 6, stats: 64 alu 0 tex 0 flow
|