DNA: Move irradiance grid light cache data to Object level #106808
|
@ -187,6 +187,8 @@ static void lightprobe_grid_cache_frame_blend_read(BlendDataReader *reader,
|
|||
cache->baking.L1_a = nullptr;
|
||||
cache->baking.L1_b = nullptr;
|
||||
cache->baking.L1_c = nullptr;
|
||||
cache->surfels = nullptr;
|
||||
cache->surfels_len = 0;
|
||||
|
||||
if (cache->irradiance.L0 != nullptr) {
|
||||
BLO_read_float3_array(reader, sample_count, (float **)&cache->irradiance.L0);
|
||||
|
@ -257,6 +259,7 @@ void BKE_lightprobe_grid_cache_frame_free(LightProbeGridCacheFrame *cache)
|
|||
spherical_harmonic_free(cache->irradiance);
|
||||
spherical_harmonic_free(cache->visibility);
|
||||
MEM_SAFE_FREE(cache->connectivity.bitmask);
|
||||
MEM_SAFE_FREE(cache->surfels);
|
||||
|
||||
MEM_SAFE_FREE(cache);
|
||||
}
|
||||
|
|
|
@ -279,11 +279,19 @@ typedef struct LightProbeGridCacheFrame {
|
|||
/** Sparse or adaptive layout only: specify the blocks positions. */
|
||||
LightProbeBlockData *block_infos;
|
||||
|
||||
/** Baked data. */
|
||||
/** In-progress baked data. Not stored in file. */
|
||||
LightProbeBakingData baking;
|
||||
/** Baked data. */
|
||||
LightProbeIrradianceData irradiance;
|
||||
LightProbeVisibilityData visibility;
|
||||
LightProbeConnectivityData connectivity;
|
||||
|
||||
char _pad[4];
|
||||
|
||||
/** Number of debug surfels. */
|
||||
int surfels_len;
|
||||
/** Debug surfels used to visualize the baking process. Not stored in file. */
|
||||
void *surfels;
|
||||
} LightProbeGridCacheFrame;
|
||||
|
||||
/** #LightProbeGridCacheFrame.data_layout (int) */
|
||||
|
|
Loading…
Reference in New Issue