summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2013-08-23 01:51:58 -0700
committerTim Angus <tim@ngus.net>2014-06-17 17:43:34 +0100
commit52d8a6ab67037b9044edc482da911f10165da881 (patch)
tree67893983c991a456c74dfd7aed1870845d8ce63a
parent84638195e09c8e2433eba2ccb0e4b25e81a32ff9 (diff)
Fix upside-down SSAO.
-rw-r--r--src/renderergl2/tr_backend.c6
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;