Use cache index to place shader table values

This commit is contained in:
Jarrod Doyle 2023-05-04 16:16:04 +01:00
parent 0625d2e264
commit 6d9fc9b0b8
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ impl BrickmapManager {
self.update_brickgrid_element(context, chunk_idx, brickgrid_element); self.update_brickgrid_element(context, chunk_idx, brickgrid_element);
// Update the shading table // Update the shading table
let shading_idx = chunk_idx * 512; let shading_idx = self.brickmap_cache_idx * 512;
self.shading_table.splice( self.shading_table.splice(
shading_idx..(shading_idx + albedo_data.len()), shading_idx..(shading_idx + albedo_data.len()),
albedo_data.clone(), albedo_data.clone(),