Sign in

Aisha Brown

@aishization.bsky.social
689 followers 467 following 5 posts

Graphics programming at Supermassive Games. Previously Unity and Feral Interactive

PostsRepliesMedia
Aisha Brown @aishization.bsky.social · 15/02/2026
Arbitrary depth write (SV_Depth) might be fine in any case as long as you're aware of the potential performance impact
010
Aisha Brown @aishization.bsky.social · 15/02/2026
Yes, as long as you can ensure fragments are writing depth as being further away from the camera and never closer. It should be a viable approach.
110
Aisha Brown @aishization.bsky.social · 15/02/2026
You can mitigate some of the impact by using SV_DepthGreaterEqual (hlsl system semantic) where the fragment shader will write a depth value greater or equal, which allows the early depth testing to still occur, but restricts the the valid depth values you can write
140
Aisha Brown @aishization.bsky.social · 15/02/2026
You can, but you should be careful about doing so, as it will disable some hardware optimizations like early z testing (testing that gets run before the fragment shader is dispatched). So it will have a performance impact.
230
Aisha Brown @aishization.bsky.social · 26/05/2025
be aware, if you are targetting cross platform and not just directx/hlsl then some shader compilers may act counterintuitively with NaN/Inf. Specifically, in Metal with fastmath enabled the shader compiler can treat NaN or INF as undefined behaviour. It may delete whole chunks of code
1160