Permalink
Browse files

Particles were using the wrong depth map.

  • Loading branch information...
1 parent 827daf8 commit 841fddaa280f0c5a78cad1e520861853e941677e @gimhael gimhael committed Feb 4, 2016
@@ -2778,7 +2778,7 @@ void RB_RenderGlobalFog()
GL_BindToTMU( 0, tr.fogImage );
// bind u_DepthMap
- GL_BindToTMU( 1, tr.depthRenderImage );
+ GL_BindToTMU( 1, tr.currentDepthImage );
// set 2D virtual screen size
GL_PushMatrix();
@@ -2688,8 +2688,6 @@ static void R_CreateDepthRenderImage()
height = NearestPowerOfTwo( glConfig.vidHeight );
}
- tr.depthRenderImage = R_CreateImage( "_depthRender", nullptr, width, height, 1, IF_NOPICMIP | IF_DEPTH24, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
-
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 );
@@ -2628,7 +2628,6 @@ static inline void halfToFloat( const f16vec4_t in, vec4_t out )
image_t *bloomRenderFBOImage[ 2 ];
image_t *currentRenderImage[ 2 ];
image_t *currentDepthImage;
- image_t *depthRenderImage;
image_t *depthtile1RenderImage;
image_t *depthtile2RenderImage;
image_t *lighttileRenderImage;
@@ -700,7 +700,7 @@ static void Render_generic( int stage )
gl_genericShader->SetUniform_DepthScale( pStage->depthFadeValue );
}
if( needDepthMap ) {
- GL_BindToTMU( 1, tr.depthRenderImage );
+ GL_BindToTMU( 1, tr.currentDepthImage );
}
gl_genericShader->SetRequiredVertexPointers();
@@ -2259,7 +2259,7 @@ static void Render_liquid( int stage )
GL_BindToTMU( 1, tr.portalRenderImage );
// depth texture
- GL_BindToTMU( 2, tr.depthRenderImage );
+ GL_BindToTMU( 2, tr.currentDepthImage );
// bind u_NormalMap
GL_BindToTMU( 3, pStage->bundle[ TB_COLORMAP ].image[ 0 ] );

0 comments on commit 841fdda

Please sign in to comment.