ioquake / ioq3

The ioquake3 community effort to continue supporting/developing id's Quake III Arena
https://www.ioquake3.org/
GNU General Public License v2.0
2.34k stars 523 forks source link

OpenGL2: Fix sun rays being affected by the viewport size #635

Closed zturtleman closed 4 months ago

zturtleman commented 4 months ago

Using r_drawSunRays 1, r_hdr 0, cg_viewsize 50 caused the sun rays to only draw properly in the bottom right quarter of the world viewport.

The scissor rectangle for the world viewport was applied to the first FBO_FastBlit() in RB_SunRays().

Set glScissor() in FBO_FastBlit() as it's done in FBO_Blit() and FBO_BlitFromTexture(). Sun rays probably worked correctly with r_hdr 1 because the blit for HDR changed the scissor state.

Fixes #305.