diff --git a/MAGE/Shaders/shaders/voxelization/voxel.hlsli b/MAGE/Shaders/shaders/voxelization/voxel.hlsli index 29408a2f6..f3c484151 100644 --- a/MAGE/Shaders/shaders/voxelization/voxel.hlsli +++ b/MAGE/Shaders/shaders/voxelization/voxel.hlsli @@ -24,11 +24,11 @@ float3 DecodeRadiance(uint encoded_L) { return LogLuvToRGB(UnpackR8G8B8A8(encoded_L)); } -uint EncodeUnitVector(float3 n) { +uint EncodeNormal(float3 n) { return PackR16G16(NORMAL_ENCODE_FUNCTION(n)); } -float3 DecodeUnitVector(uint encoded_n) { +float3 DecodeNormal(uint encoded_n) { return NORMAL_DECODE_FUNCTION(UnpackR16G16(encoded_n)); } diff --git a/MAGE/Shaders/shaders/voxelization/voxelization.hlsli b/MAGE/Shaders/shaders/voxelization/voxelization.hlsli index 67490b187..b9947f166 100644 --- a/MAGE/Shaders/shaders/voxelization/voxelization.hlsli +++ b/MAGE/Shaders/shaders/voxelization/voxelization.hlsli @@ -75,7 +75,7 @@ void PS(PSInputPositionNormalTexture input) { // Encode the radiance and normal. const uint encoded_L = EncodeRadiance(L); - const uint endoced_n = EncodeUnitVector(n_world); + const uint endoced_n = EncodeNormal(n_world); // Store the encoded radiance and normal. InterlockedMax(voxel_grid[flat_index].encoded_L, encoded_L); InterlockedMax(voxel_grid[flat_index].encoded_n, endoced_n); //TODO