Skip to content

Commit 7419e2c

Browse files
committed
Improve precision of depth rendering
1 parent bf93fcb commit 7419e2c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/TSMapEditor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static class Constants
100100
public const float RemapBrightenFactor = 1.25f;
101101

102102
// The resolution of depth rendering. In other words, the minimum depth difference that is significant enough to have an impact on rendering order.
103-
public const float DepthEpsilon = 1f / 333f;
103+
public const float DepthEpsilon = 1e-5f;
104104

105105
// Depth is between 0.0 and 1.0. How much of the scale is reserved for depth increasing as we go southwards on the map.
106106
public const float DownwardsDepthRenderSpace = 0.90f;

src/TSMapEditor/Rendering/ObjectRenderers/ObjectDepthAdjustments.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
{
33
public static class ObjectDepthAdjustments
44
{
5-
public const int Aircraft = 2;
5+
public const int Aircraft = 300;
66
public const int Animation = 0;
7-
public const int Building = 2;
8-
public const int BuildingFoundationLines = 2;
9-
public const int Infantry = 2;
10-
public const int Overlay = 1;
11-
public const int Terrain = 2;
12-
public const int Vehicle = 1;
7+
public const int Building = 300;
8+
public const int BuildingFoundationLines = 300;
9+
public const int Infantry = 300;
10+
public const int Overlay = 150;
11+
public const int Terrain = 300;
12+
public const int Vehicle = 150;
1313
}
1414
}

0 commit comments

Comments
 (0)