Texture3D: Apply a slight offset to the fragment uniform to account for rounding errors

main
Caleb Cornett 2024-02-07 10:09:48 -06:00
parent 74b6e00bc8
commit f9a41ce231
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ namespace MoonWorks.Test
protected override void Draw(double alpha)
{
FragUniform fragUniform = new FragUniform((float) currentDepth / texture.Depth);
FragUniform fragUniform = new FragUniform((float)currentDepth / texture.Depth + 0.01f);
CommandBuffer cmdbuf = GraphicsDevice.AcquireCommandBuffer();
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);