Fix for alignment issue with terrain heights. (#5274)

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
monroegm-disable-blank-issue-2
Ken Pruiksma 4 years ago committed by GitHub
parent 356fec5490
commit 9c28d134db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -218,9 +218,10 @@ float4x4 GetObject_WorldMatrix()
float GetHeight(float2 origUv)
{
float2 uv = clamp(origUv + (ObjectSrg::m_terrainData.m_uvStep * 0.5f), 0.0f, 1.0f);
float height = 0.0f;
float2 halfStep = ObjectSrg::m_terrainData.m_uvStep * 0.5;
float2 uv = origUv * (1.0 - ObjectSrg::m_terrainData.m_uvStep) + halfStep;
float height = 0.0f;
if (o_useTerrainSmoothing)
{
float2 textureSize;

Loading…
Cancel
Save