From 6f293ed7958d56fb4a8033f04e5ef59e037d2ae7 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 14 Apr 2020 17:05:45 -0300 Subject: Add support for projectors in spot and omni lights. --- servers/rendering/rasterizer_rd/rasterizer_storage_rd.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'servers/rendering/rasterizer_rd/rasterizer_storage_rd.h') diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.h b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.h index e8ee135f2b..1980f043a0 100644 --- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.h +++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.h @@ -178,6 +178,7 @@ private: struct DecalAtlas { struct Texture { + int panorama_to_dp_users; int users; Rect2 uv_rect; }; @@ -599,8 +600,8 @@ public: virtual Size2 texture_size_with_proxy(RID p_proxy); - virtual void texture_add_to_decal_atlas(RID p_texture); - virtual void texture_remove_from_decal_atlas(RID p_texture); + virtual void texture_add_to_decal_atlas(RID p_texture, bool p_panorama_to_dp = false); + virtual void texture_remove_from_decal_atlas(RID p_texture, bool p_panorama_to_dp = false); RID decal_atlas_get_texture() const; RID decal_atlas_get_texture_srgb() const; @@ -964,6 +965,14 @@ public: return light->param[p_param]; } + _FORCE_INLINE_ RID light_get_projector(RID p_light) { + + const Light *light = light_owner.getornull(p_light); + ERR_FAIL_COND_V(!light, RID()); + + return light->projector; + } + _FORCE_INLINE_ Color light_get_color(RID p_light) { const Light *light = light_owner.getornull(p_light); -- cgit v1.2.3