Yeah I’m just not following exactly how I’m supposed to do it.
Is talking about a transform in the shader? Or is he messing with pixel depth offset (which seems to change nothing for me, even when you visualize the depth buffer nothing changes, ive tried 0, 1, 100000, depth buffer doesnt change)
or do i have to toggle custom scene depth on the mesh?
I started looking at the unreal engine code and I was going to see if I could hack in a logarithmic Z buffer. Apparently this is the holy grail of zbuffer. I narrowed it down to DepthRendering.cpp (I think…) but that’s where I stopped. It would probably take me a few days to figure out the exact spot to overide the Z buffer with a logarithmic one. I’m surprised Unreal doesn’t have it as an option in the editor, feels like it would be trivial to add, and add a VERY useful feature.
If I do ever figure it out maybe I can submit a pull request and they can add it as a optional z buffer in the editor. Z-fighting is a bummer when you have a huge scene or far away objects. It even seems to affect decals, shadows, textures and shaders as well when your z precision starts to fail.