Hi, I'd like to ask how did you solve the "MSAA vs. gl_FragDepth writes" problem. If that not a secret
I'm trying to implement log depth buffer using knowledge from your great articles, thanks a lot for them. The logaritmic depth works fine, but since I need to have some large triangles in the scene, I have to write the modified depth in fragment shader using gl_FragDepth. Doing it just in vertex shader and letting interpolators to do the job lead into inprecise depth values for large triangles on the screen.
I haven't come that far with my code yet, but I presume that assigning to gl_FragDepth will break the logic of MSAA, where the fragment shader is executed once per pixel of the rasterized element. It means that in this case it outputs the same depth value for all MSAA pixel samples, which is not what we want - it disables the antialiasing.
I would be thankful if you can give me at least a hint, how did you solve this problem in Outerra. I see that in Anteworld demo, there is no Z-fighting (thus the log depth is turned on) and MSAA works as a dream - edges are smooth both for terrain and nearby 3D objects. Sorry it it is already answered elsewhere, I was searching for it, but without any success.
Thanks and have a nice day.