diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-01-20 00:10:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-20 00:10:21 +0100 |
| commit | 8a6d4dd5ed770f4dc464bbc6af912b96c63bbc2c (patch) | |
| tree | 357c7089c986be1f7d9a97e275424ffc326c6a8d /scene | |
| parent | f768d8651687cd80da85043c4446b9e0a50f39ef (diff) | |
| parent | 099dee35f47db3e293cb8e60287ffe6a44f3d5d4 (diff) | |
| download | redot-engine-8a6d4dd5ed770f4dc464bbc6af912b96c63bbc2c.tar.gz | |
Merge pull request #45023 from reduz/optimize-shader-vgpr1
Shader optimizations to reduce VGPR usage and increase occupancy
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/3d/light_3d.cpp | 4 | ||||
| -rw-r--r-- | scene/main/viewport.cpp | 4 | ||||
| -rw-r--r-- | scene/main/viewport.h | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index acae9965e5..b998a1a400 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -212,6 +212,10 @@ void Light3D::_validate_property(PropertyInfo &property) const { property.usage = 0; } + if (get_light_type() == RS::LIGHT_DIRECTIONAL && property.name == "light_specular") { + property.usage = 0; + } + if (get_light_type() == RS::LIGHT_DIRECTIONAL && property.name == "light_projector") { property.usage = 0; } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d687d31909..31496366de 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3605,6 +3605,10 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(DEBUG_DRAW_SDFGI_PROBES); BIND_ENUM_CONSTANT(DEBUG_DRAW_GI_BUFFER); BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLE_LOD); + BIND_ENUM_CONSTANT(DEBUG_DRAW_CLUSTER_OMNI_LIGHTS); + BIND_ENUM_CONSTANT(DEBUG_DRAW_CLUSTER_SPOT_LIGHTS); + BIND_ENUM_CONSTANT(DEBUG_DRAW_CLUSTER_DECALS); + BIND_ENUM_CONSTANT(DEBUG_DRAW_CLUSTER_REFLECTION_PROBES); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index f0818a9fed..7473b6937f 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -143,6 +143,10 @@ public: DEBUG_DRAW_SDFGI_PROBES, DEBUG_DRAW_GI_BUFFER, DEBUG_DRAW_DISABLE_LOD, + DEBUG_DRAW_CLUSTER_OMNI_LIGHTS, + DEBUG_DRAW_CLUSTER_SPOT_LIGHTS, + DEBUG_DRAW_CLUSTER_DECALS, + DEBUG_DRAW_CLUSTER_REFLECTION_PROBES, }; enum DefaultCanvasItemTextureFilter { |
