From 52d8a6ab67037b9044edc482da911f10165da881 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Fri, 23 Aug 2013 01:51:58 -0700 Subject: Fix upside-down SSAO. --- src/renderergl2/tr_backend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit