Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed issue where scene list was not refreshed upon deleting an APV baking set.
- Fixed a null ref exception in Volume Explorer
- Fixed one frame flicker on hardware DRS - (case 1398085)
- Fixed using the wrong coordinate to compute the sampling direction for the screen space global illumination.

## [14.0.0] - 2021-11-17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,21 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID,
UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z);

// Compute the pixel position to process
uint2 currentCoord = groupId * INDIRECT_DIFFUSE_TILE_SIZE + groupThreadId;

uint2 inputCoord = dispatchThreadId.xy;
uint2 currentCoord = dispatchThreadId.xy;
#if HALF_RES
// Compute the full resolution pixel for the inputs that do not have a pyramid
currentCoord = currentCoord * 2;
inputCoord = inputCoord * 2;
#endif

// Read the depth and compute the position
float deviceDepth = LOAD_TEXTURE2D_X(_DepthTexture, currentCoord).x;
uint2 tileIndex = uint2(currentCoord) / GetTileSize();
PositionInputs posInput = GetPositionInput(currentCoord, _ScreenSize.zw, deviceDepth, UNITY_MATRIX_I_VP, GetWorldToViewMatrix(), tileIndex);
float deviceDepth = LOAD_TEXTURE2D_X(_DepthTexture, inputCoord).x;
uint2 tileIndex = uint2(inputCoord) / GetTileSize();
PositionInputs posInput = GetPositionInput(inputCoord, _ScreenSize.zw, deviceDepth, UNITY_MATRIX_I_VP, GetWorldToViewMatrix(), tileIndex);

// Read the pixel normal
NormalData normalData;
DecodeFromNormalBuffer(currentCoord.xy, normalData);
DecodeFromNormalBuffer(inputCoord.xy, normalData);

// Generete a new direction to follow
float2 newSample;
Expand Down Expand Up @@ -308,5 +308,5 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID,
color = HsvToRgb(color);

// Write the output to the target pixel
_IndirectDiffuseTextureRW[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = color;
_IndirectDiffuseTextureRW[COORD_TEXTURE2D_X(currentCoord)] = color;
}