mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +00:00
- 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:
parent
34e2e77f9e
commit
5b7826f68b
2 changed files with 2 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue