diff options
author | SmileTheory <SmileTheory@gmail.com> | 2013-08-23 01:51:58 -0700 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:34 +0100 |
commit | 52d8a6ab67037b9044edc482da911f10165da881 (patch) | |
tree | 67893983c991a456c74dfd7aed1870845d8ce63a | |
parent | 84638195e09c8e2433eba2ccb0e4b25e81a32ff9 (diff) |
Fix upside-down SSAO.
-rw-r--r-- | src/renderergl2/tr_backend.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/renderergl2/tr_backend.c b/src/renderergl2/tr_backend.c index 65355f95..5340867c 100644 --- a/src/renderergl2/tr_backend.c +++ b/src/renderergl2/tr_backend.c @@ -1651,7 +1651,11 @@ const void *RB_PostProcess(const void *data) srcBox[2] = backEnd.viewParms.viewportWidth * tr.screenSsaoImage->width / (float)glConfig.vidWidth; srcBox[3] = backEnd.viewParms.viewportHeight * tr.screenSsaoImage->height / (float)glConfig.vidHeight; - FBO_BlitFromTexture(tr.screenSsaoImage, srcBox, NULL, srcFbo, dstBox, NULL, NULL, GLS_SRCBLEND_DST_COLOR | GLS_DSTBLEND_ZERO); + //FBO_BlitFromTexture(tr.screenSsaoImage, srcBox, NULL, srcFbo, dstBox, NULL, NULL, GLS_SRCBLEND_DST_COLOR | GLS_DSTBLEND_ZERO); + srcBox[1] = tr.screenSsaoImage->height - srcBox[1]; + srcBox[3] = -srcBox[3]; + + FBO_Blit(tr.screenSsaoFbo, srcBox, NULL, srcFbo, dstBox, NULL, NULL, GLS_SRCBLEND_DST_COLOR | GLS_DSTBLEND_ZERO); } srcBox[0] = backEnd.viewParms.viewportX; |