mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 12:30:32 +00:00
- do not perform shadowmap updates when dynamic lights are disabled.
This commit is contained in:
parent
6a63d9e70e
commit
c24f644a61
2 changed files with 4 additions and 2 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "hw_dynlightdata.h"
|
||||
#include "buffers.h"
|
||||
#include "shaderuniforms.h"
|
||||
#include "g_cvars.h"
|
||||
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
||||
|
||||
/*
|
||||
|
@ -98,7 +99,7 @@ bool IShadowMap::PerformUpdate()
|
|||
LightsProcessed = 0;
|
||||
LightsShadowmapped = 0;
|
||||
|
||||
if (gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && CollectLights != nullptr)
|
||||
if (gl_lights && gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && CollectLights != nullptr)
|
||||
{
|
||||
UpdateCycles.Clock();
|
||||
UploadAABBTree();
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "flatvertices.h"
|
||||
#include "v_palette.h"
|
||||
#include "d_main.h"
|
||||
#include "g_cvars.h"
|
||||
|
||||
#include "hw_lightbuffer.h"
|
||||
#include "hw_cvars.h"
|
||||
|
@ -107,7 +108,7 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
|
|||
|
||||
R_SetupFrame(mainvp, r_viewwindow, camera);
|
||||
|
||||
if (mainview && toscreen && !(camera->Level->flags3 & LEVEL3_NOSHADOWMAP) && gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER))
|
||||
if (mainview && toscreen && !(camera->Level->flags3 & LEVEL3_NOSHADOWMAP) && gl_lights && gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER))
|
||||
{
|
||||
screen->SetAABBTree(camera->Level->aabbTree);
|
||||
screen->mShadowMap.SetCollectLights([=] {
|
||||
|
|
Loading…
Reference in a new issue