Permalink
Browse files

Fix first row of light tiles being not rendered for some resolutions.

  • Loading branch information...
gimhael committed Mar 21, 2016
1 parent 77f41db commit 47309af432afa5697819933f2397afb58d737ad0
Showing with 5 additions and 1 deletion.
  1. +4 −0 daemon/src/engine/renderer/tr_backend.cpp
  2. +1 −1 daemon/src/engine/renderer/tr_image.cpp
@@ -2784,6 +2784,7 @@ void RB_RenderPostDepth()
w = (glConfig.vidWidth + TILE_SIZE_STEP1 - 1) >> TILE_SHIFT_STEP1;
h = (glConfig.vidHeight + TILE_SIZE_STEP1 - 1) >> TILE_SHIFT_STEP1;
GL_Viewport( 0, 0, w, h );
GL_Scissor( 0, 0, w, h );
gl_depthtile1Shader->BindProgram( 0 );
zParams[ 0 ] = 2.0f * tanf( DEG2RAD( backEnd.refdef.fov_x * 0.5f) ) / glConfig.vidWidth;
@@ -2801,6 +2802,7 @@ void RB_RenderPostDepth()
w = (glConfig.vidWidth + TILE_SIZE - 1) >> TILE_SHIFT;
h = (glConfig.vidHeight + TILE_SIZE - 1) >> TILE_SHIFT;
GL_Viewport( 0, 0, w, h );
GL_Scissor( 0, 0, w, h );
gl_depthtile2Shader->BindProgram( 0 );
GL_BindToTMU( 0, tr.depthtile1RenderImage );
@@ -2844,6 +2846,8 @@ void RB_RenderPostDepth()
R_BindFBO( tr.mainFBO[ backEnd.currentMainFBO ] );
GL_Viewport( backEnd.viewParms.viewportX, backEnd.viewParms.viewportY,
backEnd.viewParms.viewportWidth, backEnd.viewParms.viewportHeight );
GL_Scissor( backEnd.viewParms.viewportX, backEnd.viewParms.viewportY,
backEnd.viewParms.viewportWidth, backEnd.viewParms.viewportHeight );
GL_CheckErrors();
}
@@ -2632,7 +2632,7 @@ static void R_CreateDepthRenderImage()
w = (width + TILE_SIZE_STEP1 - 1) >> TILE_SHIFT_STEP1;
h = (height + TILE_SIZE_STEP1 - 1) >> TILE_SHIFT_STEP1;
tr.depthtile1RenderImage = R_CreateImage( "_depthtile1Render", nullptr, w, h, 1, IF_NOPICMIP | IF_RGBA32F, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
tr.depthtile1RenderImage = R_CreateImage( "_depthtile1Render", nullptr, w, h, 1, IF_NOPICMIP | IF_RGBA32F, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_ONE_CLAMP );
w = (width + TILE_SIZE - 1) >> TILE_SHIFT;
h = (height + TILE_SIZE - 1) >> TILE_SHIFT;

0 comments on commit 47309af

Please sign in to comment.