summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_rd/storage_rd
diff options
context:
space:
mode:
authorMarkus Grafen <markus.grafen@rub.de>2023-05-19 19:22:10 +0200
committerMarkus Grafen <markus.grafen@rub.de>2023-05-19 19:22:10 +0200
commit8a3e829930c5b18eb60716293a753ec3e3d67757 (patch)
tree8d72cc0403986d438fca7222984b4a9b8ad1fbac /servers/rendering/renderer_rd/storage_rd
parent5bb7d585a5e151f3fa387de7dd97d7aebc5abfd5 (diff)
downloadredot-engine-8a3e829930c5b18eb60716293a753ec3e3d67757.tar.gz
(Re-)Implemented Light3D's property "shadow_reverse_cull_face"
The parameter shadow_reverse_cull_face is now passed to the shadow pass so that the mesh back-faces are used for shadow map calculation.
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/light_storage.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/light_storage.h b/servers/rendering/renderer_rd/storage_rd/light_storage.h
index 3360358169..512c440ae8 100644
--- a/servers/rendering/renderer_rd/storage_rd/light_storage.h
+++ b/servers/rendering/renderer_rd/storage_rd/light_storage.h
@@ -451,7 +451,7 @@ public:
/* LIGHT */
- bool owns_light(RID p_rid) { return light_owner.owns(p_rid); };
+ bool owns_light(RID p_rid) { return light_owner.owns(p_rid); }
void _light_initialize(RID p_rid, RS::LightType p_type);
@@ -565,6 +565,13 @@ public:
return light->param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS];
}
+ virtual bool light_get_reverse_cull_face_mode(RID p_light) const override {
+ const Light *light = light_owner.get_or_null(p_light);
+ ERR_FAIL_COND_V(!light, false);
+
+ return light->reverse_cull;
+ }
+
virtual RS::LightBakeMode light_get_bake_mode(RID p_light) override;
virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) override;
virtual uint64_t light_get_version(RID p_light) const override;