You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Implement new CPU lightmapper
Completely re-write the lightmap generation code: - Follow the general lightmapper code structure from 4.0. - Use proper path tracing to compute the global illumination. - Use atlassing to merge all lightmaps into a single texture (done by @RandomShaper) - Use OpenImageDenoiser to improve the generated lightmaps. - Take into account alpha transparency in material textures. - Allow baking environment lighting. - Add bicubic lightmap filtering. There is some minor compatibility breakage in some properties and methods in BakedLightmap, but lightmaps generated in previous engine versions should work fine out of the box. The scene importer has been changed to generate `.unwrap_cache` files next to the imported scene files. These files *SHOULD* be added to any version control system as they guarantee there won't be differences when re-importing the scene from other OSes or engine versions. This work started as a Google Summer of Code project; Was later funded by IMVU for a good amount of progress; Was then finished and polished by me on my free time. Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
This commit is contained in:
@@ -120,6 +120,8 @@ public:
|
||||
InstanceBase *lightmap_capture;
|
||||
RID lightmap;
|
||||
Vector<Color> lightmap_capture_data; //in a array (12 values) to avoid wasting space if unused. Alpha is unused, but needed to send to shader
|
||||
int lightmap_slice;
|
||||
Rect2 lightmap_uv_rect;
|
||||
|
||||
virtual void base_removed() = 0;
|
||||
virtual void base_changed(bool p_aabb, bool p_materials) = 0;
|
||||
@@ -135,6 +137,8 @@ public:
|
||||
baked_light = false;
|
||||
redraw_if_visible = false;
|
||||
lightmap_capture = NULL;
|
||||
lightmap_slice = -1;
|
||||
lightmap_uv_rect = Rect2(0, 0, 1, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user