Skip to content

Commit

Permalink
Redo: voxel normal encoding naming
Browse files Browse the repository at this point in the history
  • Loading branch information
matt77hias committed Apr 23, 2018
1 parent 8fc7647 commit 567c5bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MAGE/Shaders/shaders/voxelization/voxel.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
2 changes: 1 addition & 1 deletion MAGE/Shaders/shaders/voxelization/voxelization.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 567c5bb

Please sign in to comment.