- set lightblendmode to 0 when setting up a 2D viewpoint.

2D never uses dynamic lights so this should always be 0 - and eliminates another place in the backend referencing game data.
This commit is contained in:
Christoph Oelckers 2023-01-15 09:21:01 +01:00
parent 34e2e77f9e
commit 5b7826f68b
2 changed files with 2 additions and 3 deletions

View File

@ -30,7 +30,6 @@
#include "hw_renderstate.h"
#include "hw_viewpointbuffer.h"
#include "hw_cvars.h"
#include "g_levellocals.h"
static const int INITIAL_BUFFER_SIZE = 100; // 100 viewpoints per frame should nearly always be enough
@ -92,7 +91,7 @@ void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height, int pll)
matrices.mPalLightLevels = pll;
matrices.mClipLine.X = -10000000.0f;
matrices.mShadowmapFilter = gl_shadowmap_filter;
matrices.mLightBlendMode = (level.info ? (int)level.info->lightblendmode : 0);
matrices.mLightBlendMode = 0;
matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f);
matrices.CalcDependencies();

View File

@ -87,7 +87,7 @@ void main()
gradientdist.y = worldcoord.y - bottomatpoint;
gradientdist.z = clamp(gradientdist.x / (topatpoint - bottomatpoint), 0.0, 1.0);
}
if (uSplitBottomPlane.z != 0.0)
{
ClipDistance3 = ((uSplitTopPlane.w + uSplitTopPlane.x * worldcoord.x + uSplitTopPlane.y * worldcoord.z) * uSplitTopPlane.z) - worldcoord.y;