1: const float Cc = 1.0;
2: const float Far = 1000000000.0;
3: output.Position.z = log(Cc*output.Position.z + 1) / log(Cc*Far + 1) * output.Position.w;
I show how this works in the following screenshots.
without the logarithmic z buffer
with logarithmic z buffer
It has now brought to my attention a few other things i can see but for now this will do :).
No comments:
Post a Comment