mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
uniform mat4 _World2Shadow3;
|
|
uniform mat4 _World2Shadow2;
|
|
uniform mat4 _World2Shadow1;
|
|
uniform mat4 _World2Shadow;
|
|
uniform mat4 _TerrainEngineBendTree;
|
|
uniform vec4 _SquashPlaneNormal;
|
|
uniform float _SquashAmount;
|
|
uniform vec4 _Scale;
|
|
uniform mat4 _Object2World;
|
|
uniform vec4 _LightShadowData;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
vec4 pos;
|
|
pos = gl_Vertex;
|
|
pos.xyz = (gl_Vertex.xyz * _Scale.xyz);
|
|
vec4 tmpvar_2;
|
|
tmpvar_2.w = 0.0;
|
|
tmpvar_2.xyz = pos.xyz;
|
|
pos.xyz = mix (pos.xyz, (_TerrainEngineBendTree * tmpvar_2).xyz, gl_Color.www);
|
|
vec3 tmpvar_3;
|
|
tmpvar_3.xz = vec2(0.0, 0.0);
|
|
tmpvar_3.y = _SquashPlaneNormal.w;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.w = 1.0;
|
|
tmpvar_4.xyz = mix ((pos.xyz + (dot (_SquashPlaneNormal.xyz, (tmpvar_3 - pos.xyz)) * _SquashPlaneNormal.xyz)), pos.xyz, vec3(_SquashAmount));
|
|
pos = tmpvar_4;
|
|
float tmpvar_5;
|
|
tmpvar_5 = -((gl_ModelViewMatrix * tmpvar_4).z);
|
|
tmpvar_1.x = tmpvar_5;
|
|
tmpvar_1.y = ((tmpvar_5 * _LightShadowData.z) + _LightShadowData.w);
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = (_Object2World * tmpvar_4);
|
|
gl_Position = (gl_ModelViewProjectionMatrix * tmpvar_4);
|
|
vec4 tmpvar_7;
|
|
tmpvar_7.w = 0.0;
|
|
tmpvar_7.xyz = (_World2Shadow * tmpvar_6).xyz;
|
|
gl_TexCoord[0] = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8.w = 0.0;
|
|
tmpvar_8.xyz = (_World2Shadow1 * tmpvar_6).xyz;
|
|
gl_TexCoord[1] = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9.w = 0.0;
|
|
tmpvar_9.xyz = (_World2Shadow2 * tmpvar_6).xyz;
|
|
gl_TexCoord[2] = tmpvar_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10.w = 0.0;
|
|
tmpvar_10.xyz = (_World2Shadow3 * tmpvar_6).xyz;
|
|
gl_TexCoord[3] = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11.zw = vec2(0.0, 0.0);
|
|
tmpvar_11.xy = tmpvar_1;
|
|
gl_TexCoord[4] = tmpvar_11;
|
|
}
|
|
|