summaryrefslogtreecommitdiff
path: root/servers/rendering/rasterizer_rd/rasterizer_storage_rd.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-04-14 17:05:45 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-04-14 17:05:45 -0300
commit6f293ed7958d56fb4a8033f04e5ef59e037d2ae7 (patch)
tree5facee58c1dc6ede57f1b8ef3c0c0effed927103 /servers/rendering/rasterizer_rd/rasterizer_storage_rd.h
parent5e5103f460f406899582e4307e56882401fd37d5 (diff)
Add support for projectors in spot and omni lights.
Diffstat (limited to 'servers/rendering/rasterizer_rd/rasterizer_storage_rd.h')
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_storage_rd.h13
1 files changed, 11 insertions, 2 deletions
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);