mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
76 lines
2.4 KiB
Text
76 lines
2.4 KiB
Text
uniform vec4 _LightShadowData;
|
|
uniform mat4 _Object2World;
|
|
uniform vec4 _Scale;
|
|
uniform float _SquashAmount;
|
|
uniform vec4 _SquashPlaneNormal;
|
|
uniform mat4 _TerrainEngineBendTree;
|
|
uniform mat4 _World2Shadow;
|
|
uniform mat4 _World2Shadow1;
|
|
uniform mat4 _World2Shadow2;
|
|
uniform mat4 _World2Shadow3;
|
|
void main ()
|
|
{
|
|
vec4 wpos_1;
|
|
float z_2;
|
|
vec2 tmpvar_3;
|
|
vec4 pos_4;
|
|
pos_4.w = gl_Vertex.w;
|
|
pos_4.xyz = (gl_Vertex.xyz * _Scale.xyz);
|
|
vec4 tmpvar_5;
|
|
tmpvar_5.w = 0.0;
|
|
tmpvar_5.xyz = pos_4.xyz;
|
|
pos_4.xyz = mix (pos_4.xyz, (_TerrainEngineBendTree * tmpvar_5).xyz, gl_Color.www);
|
|
vec3 tmpvar_6;
|
|
tmpvar_6.xz = vec2(0.0, 0.0);
|
|
tmpvar_6.y = _SquashPlaneNormal.w;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7.w = 1.0;
|
|
tmpvar_7.xyz = mix ((pos_4.xyz + (
|
|
dot (_SquashPlaneNormal.xyz, (tmpvar_6 - pos_4.xyz))
|
|
* _SquashPlaneNormal.xyz)), pos_4.xyz, vec3(_SquashAmount));
|
|
pos_4 = tmpvar_7;
|
|
z_2 = -((gl_ModelViewMatrix * tmpvar_7).z);
|
|
tmpvar_3.x = z_2;
|
|
tmpvar_3.y = ((z_2 * _LightShadowData.z) + _LightShadowData.w);
|
|
wpos_1 = (_Object2World * tmpvar_7);
|
|
gl_Position = (gl_ModelViewProjectionMatrix * tmpvar_7);
|
|
vec4 tmpvar_8;
|
|
tmpvar_8.w = 0.0;
|
|
tmpvar_8.xyz = (_World2Shadow * wpos_1).xyz;
|
|
gl_TexCoord[0] = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9.w = 0.0;
|
|
tmpvar_9.xyz = (_World2Shadow1 * wpos_1).xyz;
|
|
gl_TexCoord[1] = tmpvar_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10.w = 0.0;
|
|
tmpvar_10.xyz = (_World2Shadow2 * wpos_1).xyz;
|
|
gl_TexCoord[2] = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11.w = 0.0;
|
|
tmpvar_11.xyz = (_World2Shadow3 * wpos_1).xyz;
|
|
gl_TexCoord[3] = tmpvar_11;
|
|
vec4 tmpvar_12;
|
|
tmpvar_12.zw = vec2(0.0, 0.0);
|
|
tmpvar_12.xy = tmpvar_3;
|
|
gl_TexCoord[4] = tmpvar_12;
|
|
}
|
|
|
|
|
|
// stats: 26 alu 0 tex 0 flow
|
|
// inputs: 2
|
|
// #0: gl_Color (high float) 4x1 [-1] loc 3
|
|
// #1: gl_Vertex (high float) 4x1 [-1] loc 0
|
|
// uniforms: 12 (total size: 0)
|
|
// #0: gl_ModelViewProjectionMatrix (high float) 4x4 [-1]
|
|
// #1: gl_ModelViewMatrix (high float) 4x4 [-1]
|
|
// #2: _LightShadowData (high float) 4x1 [-1]
|
|
// #3: _Object2World (high float) 4x4 [-1]
|
|
// #4: _Scale (high float) 4x1 [-1]
|
|
// #5: _SquashAmount (high float) 1x1 [-1]
|
|
// #6: _SquashPlaneNormal (high float) 4x1 [-1]
|
|
// #7: _TerrainEngineBendTree (high float) 4x4 [-1]
|
|
// #8: _World2Shadow (high float) 4x4 [-1]
|
|
// #9: _World2Shadow1 (high float) 4x4 [-1]
|
|
// #10: _World2Shadow2 (high float) 4x4 [-1]
|
|
// #11: _World2Shadow3 (high float) 4x4 [-1]
|