diff options
Diffstat (limited to 'reference/opt/shaders/vert/ground.vert')
-rw-r--r-- | reference/opt/shaders/vert/ground.vert | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/reference/opt/shaders/vert/ground.vert b/reference/opt/shaders/vert/ground.vert index 23d8b27d..c0d637c6 100644 --- a/reference/opt/shaders/vert/ground.vert +++ b/reference/opt/shaders/vert/ground.vert @@ -82,14 +82,15 @@ void main() _385 = 0u; } vec4 _345 = vec4((_310 + uvec2(_384, _385)).xyxy & (~_317).xxyy); - vec2 _173 = ((_53.Patches[(gl_InstanceID + SPIRV_Cross_BaseInstance)].Position.xz * _156.InvGroundSize_PatchScale.zw) + mix(_345.xy, _345.zw, vec2(_301 - _303))) * _156.InvGroundSize_PatchScale.xy; + vec2 _167 = _53.Patches[(gl_InstanceID + SPIRV_Cross_BaseInstance)].Position.xz * _156.InvGroundSize_PatchScale.zw + mix(_345.xy, _345.zw, vec2(_301 - _303)); + vec2 _173 = _167 * _156.InvGroundSize_PatchScale.xy; mediump float _362 = textureLod(TexLOD, _173, 0.0).x * 7.96875; float hp_copy_362 = _362; float _364 = floor(hp_copy_362); vec2 _185 = _156.InvGroundSize_PatchScale.xy * exp2(_364); - vec3 _230 = (vec3(_173.x, mix(textureLod(TexHeightmap, _173 + (_185 * 0.5), _364).x, textureLod(TexHeightmap, _173 + (_185 * 1.0), _364 + 1.0).x, _362 - _364), _173.y) * _156.GroundScale.xyz) + _156.GroundPosition.xyz; + vec3 _230 = vec3(_173.x, mix(textureLod(TexHeightmap, _167 * _156.InvGroundSize_PatchScale.xy + (_185 * 0.5), _364).x, textureLod(TexHeightmap, _167 * _156.InvGroundSize_PatchScale.xy + (_185 * 1.0), _364 + 1.0).x, _362 - _364), _173.y) * _156.GroundScale.xyz + _156.GroundPosition.xyz; EyeVec = _230 - _236.g_CamPos.xyz; - TexCoord = _173 + (_156.InvGroundSize_PatchScale.xy * 0.5); + TexCoord = _167 * _156.InvGroundSize_PatchScale.xy + (_156.InvGroundSize_PatchScale.xy * 0.5); gl_Position = (((_236.g_ViewProj_Row0 * _230.x) + (_236.g_ViewProj_Row1 * _230.y)) + (_236.g_ViewProj_Row2 * _230.z)) + _236.g_ViewProj_Row3; } |