diff --git a/src/d_main.cpp b/src/d_main.cpp index 57c5d84783..dd69b7d0d2 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -218,6 +218,7 @@ CUSTOM_CVAR (String, vid_cursor, "None", CVAR_ARCHIVE | CVAR_NOINITCALL) CVAR (Bool, disableautoload, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) CVAR (Bool, autoloadbrightmaps, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) CVAR (Bool, autoloadlights, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) +CVAR (Bool, r_debug_disable_vis_filter, false, 0) bool wantToRestart; bool DrawFSHUD; // [RH] Draw fullscreen HUD? diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 845ea24a8b..acd1d6d5d1 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -76,6 +76,7 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE) } EXTERN_CVAR (Float, transsouls) +EXTERN_CVAR (Bool, r_debug_disable_vis_filter) extern TArray sprites; extern TArray SpriteFrames; @@ -681,7 +682,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) // check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature, // check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it. - if ((!!(thing->RenderRequired & ~r_renderercaps)) || + if (!r_debug_disable_vis_filter && (!!(thing->RenderRequired & ~r_renderercaps)) || (!!(thing->RenderHidden & r_renderercaps))) return; diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index a859191986..3ff88514db 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -32,6 +32,7 @@ EXTERN_CVAR(Float, transsouls) EXTERN_CVAR(Int, r_drawfuzz) +EXTERN_CVAR (Bool, r_debug_disable_vis_filter) extern uint32_t r_renderercaps; bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right) @@ -179,7 +180,7 @@ bool RenderPolySprite::IsThingCulled(AActor *thing) // check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature, // check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it. - if ((!!(thing->RenderRequired & ~r_renderercaps)) || + if (!r_debug_disable_vis_filter && (!!(thing->RenderRequired & ~r_renderercaps)) || (!!(thing->RenderHidden & r_renderercaps))) return true; diff --git a/src/swrenderer/scene/r_opaque_pass.cpp b/src/swrenderer/scene/r_opaque_pass.cpp index 9325cbfcf8..5935b1ff4c 100644 --- a/src/swrenderer/scene/r_opaque_pass.cpp +++ b/src/swrenderer/scene/r_opaque_pass.cpp @@ -72,6 +72,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor); EXTERN_CVAR(Bool, r_drawvoxels); +EXTERN_CVAR(Bool, r_debug_disable_vis_filter); extern uint32_t r_renderercaps; namespace @@ -971,7 +972,7 @@ namespace swrenderer // check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature, // check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it. - if ((!!(thing->RenderRequired & ~r_renderercaps)) || + if (!r_debug_disable_vis_filter && (!!(thing->RenderRequired & ~r_renderercaps)) || (!!(thing->RenderHidden & r_renderercaps))) return false;