mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Implement cull_mask for decals and lights in mobile and compatibility backends
This commit is contained in:
parent
5eb2011423
commit
56450fb179
13 changed files with 35 additions and 16 deletions
|
|
@ -311,6 +311,13 @@ uint64_t LightStorage::light_get_version(RID p_light) const {
|
|||
return light->version;
|
||||
}
|
||||
|
||||
uint32_t LightStorage::light_get_cull_mask(RID p_light) const {
|
||||
const Light *light = light_owner.get_or_null(p_light);
|
||||
ERR_FAIL_COND_V(!light, 0);
|
||||
|
||||
return light->cull_mask;
|
||||
}
|
||||
|
||||
AABB LightStorage::light_get_aabb(RID p_light) const {
|
||||
const Light *light = light_owner.get_or_null(p_light);
|
||||
ERR_FAIL_COND_V(!light, AABB());
|
||||
|
|
|
|||
|
|
@ -239,13 +239,6 @@ public:
|
|||
return light->color;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ uint32_t light_get_cull_mask(RID p_light) {
|
||||
const Light *light = light_owner.get_or_null(p_light);
|
||||
ERR_FAIL_COND_V(!light, 0);
|
||||
|
||||
return light->cull_mask;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ bool light_is_distance_fade_enabled(RID p_light) {
|
||||
const Light *light = light_owner.get_or_null(p_light);
|
||||
return light->distance_fade;
|
||||
|
|
@ -297,6 +290,7 @@ public:
|
|||
virtual RS::LightBakeMode light_get_bake_mode(RID p_light) override;
|
||||
virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) override { return 0; }
|
||||
virtual uint64_t light_get_version(RID p_light) const override;
|
||||
virtual uint32_t light_get_cull_mask(RID p_light) const override;
|
||||
|
||||
/* LIGHT INSTANCE API */
|
||||
|
||||
|
|
|
|||
|
|
@ -585,6 +585,7 @@ public:
|
|||
virtual void decal_set_normal_fade(RID p_decal, float p_fade) override;
|
||||
|
||||
virtual AABB decal_get_aabb(RID p_decal) const override;
|
||||
virtual uint32_t decal_get_cull_mask(RID p_decal) const override { return 0; }
|
||||
|
||||
virtual void texture_add_to_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) override {}
|
||||
virtual void texture_remove_from_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) override {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue