Skip to content

Commit 991d11a

Browse files
committed
Fix depth getting capped prior to circular graphic compensation
1 parent f6f069f commit 991d11a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/TSMapEditor/Rendering/ObjectRenderers/ObjectRenderer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,6 @@ private void RenderFrame(T gameObject, PositionedTexture frame, PositionedTextur
490490
{
491491
Texture2D texture = frame.Texture;
492492

493-
if (depthAddition > 1.0f)
494-
depthAddition = 1.0f;
495-
496493
// Add extra depth so objects show above terrain despite float imprecision
497494
// depthAddition += Constants.DepthEpsilon;
498495

@@ -508,6 +505,9 @@ private void RenderFrame(T gameObject, PositionedTexture frame, PositionedTextur
508505
}
509506
}
510507

508+
if (depthAddition > 1.0f)
509+
depthAddition = 1.0f;
510+
511511
color = new Color((color.R / 255.0f) * lightingColor.X / 2f,
512512
(color.B / 255.0f) * lightingColor.Y / 2f,
513513
(color.B / 255.0f) * lightingColor.Z / 2f, textureWidthCenterPoint);

0 commit comments

Comments
 (0)