sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Issue with shader vertex offset and depth buffer

Open onlinefrog opened this issue 6 months ago • 0 comments

Describe the bug

When offsetting vertices in a shader, when you make a modification to that shader and save it, causing it to recompile, it seems to cause the renderer to start writing the depth of the triangles before they're offset, so the actual offset triangles' pixels get discarded once they pass through those incorrect depth values.

The issue goes away when you enter play mode.

To Reproduce

vertexoffsetbugrepro.zip

  1. Open minimal.scene
  2. Modify test.shdrgrph (drag any random property and save it to recompile)
  3. Look at the cube being weird

Expected behavior

The cube surfaces should not be getting discarded

Media/Files

sbox-dev_9PW9dqSdci sbox-dev_zOuAIhJ4Ye

Additional context

Windows 11 RTX 4070 Driver 32.0.15.6070

onlinefrog avatar Aug 09 '24 23:08 onlinefrog