Navigation Menu

Skip to content

Commit

Permalink
renderer: revive liquid shader, code is currently broken
Browse files Browse the repository at this point in the history
this way broken code is less likely to be introduced in liquid shader
and it makes easier to test the code to debug it
  • Loading branch information
illwieckz committed Jan 6, 2020
1 parent 0597d13 commit 5c37019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/engine/renderer/tr_backend.cpp
Expand Up @@ -4716,14 +4716,16 @@ static void RB_RenderView( bool depthPass )

if ( backEnd.viewParms.portalLevel > 0 )
{
#if !defined( GLSL_COMPILE_STARTUP_ONLY )
{
// capture current color buffer
// liquid shader will then bind tr.portalRenderImage
// as u_PortalMap to be read by liquid glsl
// FIXME: it does not work
GL_SelectTexture( 0 );
GL_Bind( tr.portalRenderImage );
glCopyTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, 0, 0, tr.portalRenderImage->uploadWidth, tr.portalRenderImage->uploadHeight );
}
#endif

backEnd.pc.c_portals++;
}

Expand Down
8 changes: 2 additions & 6 deletions src/engine/renderer/tr_shade.cpp
Expand Up @@ -106,10 +106,10 @@ static void GLSL_InitGPUShadersOrError()
// debug utils
gl_shaderManager.load( gl_debugShadowMapShader );

#if !defined( GLSL_COMPILE_STARTUP_ONLY )

gl_shaderManager.load( gl_liquidShader );

#if !defined( GLSL_COMPILE_STARTUP_ONLY )

gl_shaderManager.load( gl_volumetricFogShader );

#endif // #if !defined(GLSL_COMPILE_STARTUP_ONLY)
Expand Down Expand Up @@ -2462,7 +2462,6 @@ static void Render_heatHaze( int stage )
GL_CheckErrors();
}

#if !defined( GLSL_COMPILE_STARTUP_ONLY )
static void Render_liquid( int stage )
{
vec3_t viewOrigin;
Expand Down Expand Up @@ -2576,9 +2575,6 @@ static void Render_liquid( int stage )

GL_CheckErrors();
}
#else
static void Render_liquid(int){}
#endif

static void Render_fog()
{
Expand Down

0 comments on commit 5c37019

Please sign in to comment.