   [DirectX 10] MSAA textures in pixel shader and depth related question
  Im trying to use Load function to get the value of normals from a MSAA texture in pixel shader but I dont know how to get the right value since there are multiple samples to choose from. I read about centroids and other things but I dont understand how it works.-->Depth related question:Can someone explain me whats is linear depth and non-linear depth and how each work?   
  What do you mean by "right" value? If you're sampling normals from a G-Buffer for deferred rendering, then you'll need to sample all of the subsamples and perform lighting for each one and then filter the results (average them). Actually you really only need to sample each unique subsample, but I would start off by just sampling all of them and get that working first. There's an article in ShaderX7 about this that you should probably check out.When you use a perspective projection, the values stored in your z-buffer are non-linear with respect to the view-space z value. The z-buffer value will increase exponentially from 0 to 1 as you move from the near-clip plane to the far-clip plane, and as a result most of your visible depth range ends up with a value that's above 0.9. A linear depth value is any value that increases linearly across the viewable range, for instance storing view-space z or view-space z divided by the maximum depth. There's some more info here.   ;Quote:Original post by MJPWhat do you mean by "right" value?Since I have 8 samples I was asking which one should I choose.But I will try to filter the results of each sample.Quote:Original post by MJPWhen you use a perspective projection, the values stored in your z-buffer are non-linear with respect to the view-space z value. The z-buffer value will increase exponentially from 0 to 1 as you move from the near-clip plane to the far-clip plane, and as a result most of your visible depth range ends up with a value that's above 0.9. A linear depth value is any value that increases linearly across the viewable range, for instance storing view-space z or view-space z divided by the maximum depth. There's some more info here.So in order to perform light pre pass should I store the depth in view space?