diff options
author | reduz <reduzio@gmail.com> | 2021-01-17 13:25:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2021-01-19 23:31:06 +0100 |
commit | 099dee35f47db3e293cb8e60287ffe6a44f3d5d4 (patch) | |
tree | dea148899efa156adf4c7b9ff32464871cef4253 /scene | |
parent | 7008e3c6eafa374e5d64ee7867608abe696698c2 (diff) |
Added GPU based cluster builder
Clustering is now GPU based, uses an implementation based on the Activision algorithm.
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 { |