OpenGL2: More ssao/depth blur improvements.

This commit is contained in:
SmileTheory 2016-03-11 04:37:50 -08:00
parent 87cb2167bf
commit 93e1feaaad
4 changed files with 21 additions and 12 deletions

View file

@ -40,8 +40,7 @@ mat2 randomRotation( const vec2 p )
float getLinearDepth(sampler2D depthMap, const vec2 tex, const float zFarDivZNear)
{
// depth is upside down?
float sampleZDivW = texture2D(depthMap, vec2(tex.x, 1.0 - tex.y)).r;
float sampleZDivW = texture2D(depthMap, tex).r;
return 1.0 / mix(zFarDivZNear, 1.0, sampleZDivW);
}