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
4 changes: 4 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed Render Graph Debug UI not refreshing correctly in the Render Pipeline Debugger.
- Fixed SSS materials in planar reflections (case 1319027).
- Fixed Decal's pivot edit mode 2D slider gizmo not supporting multi-edition
- Fixed issue were the final image is inverted in the Y axis. Occurred only on final Player (non-dev for any platform) that use Dynamic Resolution Scaling with Contrast Adaptive Sharpening filter.
- Fixed a bug with Reflection Probe baking would result in an incorrect baking reusing other's Reflection Probe baking
- Fixed volumetric fog being visually chopped or missing when using hardware Dynamic Resolution Scaling.
- Fixed generation of the packed depth pyramid when hardware Dynamic Resolution Scaling is enabled.

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4231,7 +4231,7 @@ IndirectLighting EvaluateBSDF_ScreenSpaceReflection(PositionInputs posInput,
}

lighting.specularReflected = ssrLighting.rgb * lerp(reflectanceFactorB, reflectanceFactorC, bsdfData.coatMask);
reflectionHierarchyWeight = lerp(ssrLighting.a, ssrLighting.a * reflectanceFactorC, bsdfData.coatMask);
reflectionHierarchyWeight = lerp(ssrLighting.a, ssrLighting.a * reflectanceFactorC.x, bsdfData.coatMask);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Shader "Hidden/HDRP/FinalPass"
#if defined(BILINEAR) || defined(CATMULL_ROM_4) || defined(LANCZOS)
CTYPE outColor = UpscaledResult(positionNDC.xy);
#elif defined(CONTRASTADAPTIVESHARPEN)
CTYPE outColor = LOAD_TEXTURE2D_X(_InputTexture, round(input.texcoord * _ViewPortSize.xy)).CTYPE_SWIZZLE;
CTYPE outColor = LOAD_TEXTURE2D_X(_InputTexture, ((input.texcoord.xy * _UVTransform.xy) + _UVTransform.zw) * _ViewPortSize.xy).CTYPE_SWIZZLE;
#else
CTYPE outColor = LOAD_TEXTURE2D_X(_InputTexture, positionSS).CTYPE_SWIZZLE;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ internal static void RestoreRenderPipelineAsset(bool wasUnsetFromQuality, Render
internal struct PackedMipChainInfo
{
public Vector2Int textureSize;
public Vector2Int hardwareTextureSize;
public int mipLevelCount;
public Vector2Int[] mipLevelSizes;
public Vector2Int[] mipLevelOffsets;
Expand All @@ -630,12 +631,15 @@ public void ComputePackedMipChainInfo(Vector2Int viewportSize)
if (viewportSize == mipLevelSizes[0])
return;

textureSize = viewportSize;
mipLevelSizes[0] = viewportSize;
bool isHardwareDrsOn = DynamicResolutionHandler.instance.HardwareDynamicResIsEnabled();
hardwareTextureSize = isHardwareDrsOn ? DynamicResolutionHandler.instance.ApplyScalesOnSize(viewportSize) : viewportSize;
Vector2 textureScale = isHardwareDrsOn ? new Vector2((float)viewportSize.x / (float)hardwareTextureSize.x, (float)viewportSize.y / (float)hardwareTextureSize.y) : new Vector2(1.0f, 1.0f);

mipLevelSizes[0] = hardwareTextureSize;
mipLevelOffsets[0] = Vector2Int.zero;

int mipLevel = 0;
Vector2Int mipSize = viewportSize;
Vector2Int mipSize = hardwareTextureSize;

do
{
Expand Down Expand Up @@ -665,11 +669,13 @@ public void ComputePackedMipChainInfo(Vector2Int viewportSize)

mipLevelOffsets[mipLevel] = mipBegin;

textureSize.x = Math.Max(textureSize.x, mipBegin.x + mipSize.x);
textureSize.y = Math.Max(textureSize.y, mipBegin.y + mipSize.y);
hardwareTextureSize.x = Math.Max(hardwareTextureSize.x, mipBegin.x + mipSize.x);
hardwareTextureSize.y = Math.Max(hardwareTextureSize.y, mipBegin.y + mipSize.y);
}
while ((mipSize.x > 1) || (mipSize.y > 1));

textureSize = new Vector2Int((int)((float)hardwareTextureSize.x * textureScale.x), (int)((float)hardwareTextureSize.y * textureScale.y));

mipLevelCount = mipLevel + 1;
m_OffsetBufferWillNeedUpdate = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ int Insert<TCategory>(GameObject gameObject, TCategory category)

m_IndexByGameObject.Add(gameObject, index);
m_Entries.Insert(index, entry);
for (int i = index + 1; i < m_Entries.Count; ++i)
{
// Upon insertion, all index by game object entries after the insertion point need their index updated.
m_IndexByGameObject[m_Entries[i].gameObject] = i;
}
return m_Entries[index].id;
}

Expand Down