Optimize shadow maps rendering by using new Graphics.Shadows.MinObjectPixelSize to skip sub-pixel objects

This commit is contained in:
Wojtek Figat
2026-02-23 16:53:17 +01:00
parent c51a023e61
commit 83bd1deafd
6 changed files with 117 additions and 73 deletions

View File

@@ -28,6 +28,7 @@ Quality Graphics::GIQuality = Quality::High;
bool Graphics::GICascadesBlending = false;
PostProcessSettings Graphics::PostProcessSettings;
bool Graphics::SpreadWorkload = true;
float Graphics::Shadows::MinObjectPixelSize = 2.0f;
bool Graphics::PostProcessing::ColorGradingVolumeLUT = true;
#if GRAPHICS_API_NULL

View File

@@ -85,8 +85,17 @@ public:
API_FIELD() static bool SpreadWorkload;
public:
// Shadows rendering configuration.
API_CLASS(Static, Attributes="DebugCommand") class FLAXENGINE_API Shadows
{
DECLARE_SCRIPTING_TYPE_MINIMAL(Shadows);
// The minimum size in pixels of objects to cast shadows. Improves performance by skipping too small objects (eg. sub-pixel) from rendering into shadow maps.
API_FIELD() static float MinObjectPixelSize;
};
// Post Processing effects rendering configuration.
API_CLASS(Static, Attributes = "DebugCommand") class FLAXENGINE_API PostProcessing
API_CLASS(Static, Attributes="DebugCommand") class FLAXENGINE_API PostProcessing
{
DECLARE_SCRIPTING_TYPE_MINIMAL(PostProcessing);