From a407a6060fc547978d3b391898deb390986a1382 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Mon, 17 Jun 2024 01:29:17 +0200 Subject: [PATCH] hack to draw softened particles without blending so when the shader writes a debug value as a color, I get to see that color --- neo/renderer/draw_common.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neo/renderer/draw_common.cpp b/neo/renderer/draw_common.cpp index c2b494f9..8fe96ac0 100644 --- a/neo/renderer/draw_common.cpp +++ b/neo/renderer/draw_common.cpp @@ -952,8 +952,13 @@ void RB_STD_T_RenderShaderPasses( const drawSurf_t *surf ) { qglEnableClientState( GL_COLOR_ARRAY ); } - GL_State( pStage->drawStateBits | GLS_DEPTHFUNC_ALWAYS ); // Disable depth clipping. The fragment program will + + //GL_State( pStage->drawStateBits | GLS_DEPTHFUNC_ALWAYS ); // Disable depth clipping. The fragment program will // handle it to allow overdraw. + int dsbits = pStage->drawStateBits | GLS_DEPTHFUNC_ALWAYS; + dsbits &= ~(GLS_SRCBLEND_BITS | GLS_DSTBLEND_BITS); + //dsbits |= GLS_SRCBLEND_ONE | GLS_DSTBLEND_ZERO; both values are 0, so this would be a noop + GL_State( dsbits ); qglBindProgramARB( GL_VERTEX_PROGRAM_ARB, VPROG_SOFT_PARTICLE ); qglEnable( GL_VERTEX_PROGRAM_ARB );