   Thoughts about deferred ViewPos from frustum corner ray
  I calculate the viewspace position as described here. When I do this with 16bit float and shadowmapping I am experiencing a precision problem though. So I thought maybe it would help if I don't scale the depth to [0.1]. So I just don't divide by the camera-far while writing the depth. To compensate for this I thought it would be enough to normalize the frustum corners in camera space. That doesn't really work though. Is something like this possible at all?   
  Let me make another post as I found kind of an answer. The trick is to take the frustum corners at a plane with distance 1. Then you don't need the camera z-far in the the shaders anymore. That's nice but unfortunately it did not solve my precision problem.   ;  You seem to have discovered this already, but leaving your depth un-normalized won't give you any better precision.  You can get slightly better precision by rescaling your depth to the [-1,1] range so that you make use of the sign bit, but I don't know if that's enough for you.  In my experience 16-bit has just never been enough.   ;Quote:Original post by MJPYou seem to have discovered this already, but leaving your depth un-normalized won't give you any better precision.  You can get slightly better precision by rescaling your depth to the [-1,1] range so that you make use of the sign bit, but I don't know if that's enough for you.  In my experience 16-bit has just never been enough.Glad to hear that someone has had similar experiences. I restructured my g-buffer layout to 1x32 for depth, 4x8 for color and specularCoef and 4x16 for normals and specular pow. I'm quite happy with it. Nice precision, not too much wasted space and good performance even compared to some tighter stuff I tried. I will probably stick with it, as it fits my need nicely.It bugged me a little that starcraft seems to get away with 16bit, but who knows. And admittedly I had to look close for the artifacts, although I very much prefer to have them gone for good.On a related note: MJP, did you ever get around to take a look at the picture I posted near the bottom of this thread? It is about anistropic filtering with (E)VSM in a deferred renderer. Just in case something sits at the top of your head...