summaryrefslogtreecommitdiff
path: root/modules/lightmapper_rd/SCsub
diff options
context:
space:
mode:
authorWilliam Deurwaarder <william.git@xs4all.nl>2021-09-11 14:02:37 +0200
committerWilliam Deurwaarder <william.git@xs4all.nl>2021-09-11 14:02:37 +0200
commite11dd6500a50c47e4f2d7c19813d4ba5c5533235 (patch)
treef3c792cd6d86a98d86a91e9947a2d1424a4317d7 /modules/lightmapper_rd/SCsub
parent43e96e0c652cd2ed41a1b9dfb7989ff272607a88 (diff)
GPULightmapper's triangles and their bounding box will be in-sync
Previously the bounding boxes and triangles were maintained in two separate arrays (Vectors). As the triangle vector was sorted and the bounding-box array was not , the order of both arrays differed. This meant that the index in one was different than the other, which caused lookup issues. To prevent this, the bounding-box is now part of the triangle structure so that there is a single structure that cannot become out-of-sync anymore.
Diffstat (limited to 'modules/lightmapper_rd/SCsub')
-rw-r--r--modules/lightmapper_rd/SCsub3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/lightmapper_rd/SCsub b/modules/lightmapper_rd/SCsub
index 2f04f1833e..5cc9d8ee8b 100644
--- a/modules/lightmapper_rd/SCsub
+++ b/modules/lightmapper_rd/SCsub
@@ -7,6 +7,9 @@ env_lightmapper_rd = env_modules.Clone()
env_lightmapper_rd.GLSL_HEADER("lm_raster.glsl")
env_lightmapper_rd.GLSL_HEADER("lm_compute.glsl")
env_lightmapper_rd.GLSL_HEADER("lm_blendseams.glsl")
+env_lightmapper_rd.Depends("lm_raster.glsl.gen.h", "lm_common_inc.glsl")
+env_lightmapper_rd.Depends("lm_compute.glsl.gen.h", "lm_common_inc.glsl")
+env_lightmapper_rd.Depends("lm_blendseams.glsl.gen.h", "lm_common_inc.glsl")
# Godot source files
env_lightmapper_rd.add_source_files(env.modules_sources, "*.cpp")