Damus
Rune Skovbo Johansen · 9w
I tried adding a discard to the terrain shader based on distance to the camera, to achieve a clipping sphere around the camera instead of a clipping plane. The point being to avoid the mountain silhou...
Aras Pranckevičius profile picture
@nprofile1q... no idea why that would happen, but FYI mere presence of discard in a pixel shader makes it run quite a bit slower than a always-known-to-be-opaque shader.

Maybe doing it at vertex level would be just enough? Setting vertex position to NaN effectively “discards” the whole triangle that the vertex is on
1
Rune Skovbo Johansen · 9w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqvfhu7aelr6xh3gwqnw8zjwqv0wuzl9fejfrj9ug647ldvy3jtmkq9l5x8e Really, on modern hardware? The threads I saw about discards seemed to mostly say it used to be bad on old hardware. If done at the vertex level, triangles would appear one by one in th...