Untitled
Loading...
Searching...
No Matches
lightmap.h
Go to the documentation of this file.
1
5
6#ifndef LIGHTMAP_H
7#define LIGHTMAP_H
8
9
10#include "core/engine_types.h"
11
12
17
23
29
35
40void build_uv_islands(MeshNode * mn);
41
47void save_lightmap_to_binary(LightmapData * ld, const char * name);
48
55void load_lightmap_from_binary(LightmapData * ld, const char * name);
56
64
69
74
79
84
85#endif
Engine specific types and defines.
The metadata for the lightmap settings.
The ProbeVolumes for APVs and LPVs, controlled by OBBs.
MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to ...
void LM_allocate_empty_mns()
Allocates texels for MeshNodes that don't have UVIslands generated yet.
Definition lightmap.c:502
void build_uv_islands(MeshNode *mn)
Builds UVIslands over a MeshNode by stepping through TriangleAdjacency and stopping when normals beco...
Definition lightmap.c:400
void bake_reflection_probes()
Bakes ReflectionProbes for the entire scene onto cubemaps on RPROBE_CUBE_MAP_ARRAY.
Definition lightmap.c:786
void bake_lightmap(LightmapData *ld)
Bakes a UV Lightmap based on which UVIslands have UVIsland.currently_rasterizing set.
Definition lightmap.c:1009
void LM_regenerate_texels()
Regenerates lightmap texels: re-inits LightmapData, then builds UVIslands, then calls add_all_meshes_...
Definition lightmap.c:486
void load_lightmap_from_binary(LightmapData *ld, const char *name)
Loads a UV lightmap and relevant UVIsland and MeshNode data fro, binary.
Definition lightmap.c:610
void check_lighting_pv()
Determines which LPVs we may need to replace due to distance to new ones.
Definition lightmap.c:1391
void init_uv_islands(LightmapData *ld)
Adds all current UVIslands to the lightmap by allocating LightmapRects.
Definition lightmap.c:384
void init_lightmap_data(LightmapData *ld)
Frees current LightmapAtlas and UVIsland data and re-initializes the LightmapAtlas array and initiali...
Definition lightmap.c:93
void bake_lighting_probe_volume(ProbeVolume *pv)
Loads a UV lightmap and relevant UVIsland and MeshNode data fro, binary.
Definition lightmap.c:1509
void save_lightmap_to_binary(LightmapData *ld, const char *name)
Saves a UV lightmap and relevant UVIsland and MeshNode data to binary.
Definition lightmap.c:525
void reset_lighting_pvs()
Resets current LPVs from their slots in SceneData.LOADED_LIGHTING_PV.
Definition lightmap.c:1330