Skip to content
Permalink
Browse files

renderer: revive liquid shader, code is currently broken

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 Dec 16, 2019
1 parent 0597d13 commit 5c37019fe256ed7ae8ebd5dcedef2fea6168447a
Showing with 6 additions and 8 deletions.
  1. +4 −2 src/engine/renderer/tr_backend.cpp
  2. +2 −6 src/engine/renderer/tr_shade.cpp
@@ -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++;
}

@@ -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)
@@ -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;
@@ -2576,9 +2575,6 @@ static void Render_liquid( int stage )

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

static void Render_fog()
{

0 comments on commit 5c37019

Please sign in to comment.
You can’t perform that action at this time.