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 @@ -183,6 +183,10 @@ The version number for this package has increased due to a version update of a r
- Fixed Warnings about "SceneIdMap" missing script in eye material sample scene
- Fixed wizard checking FrameSettings not in HDRP Default Settings
- Fixed error when opening the default composition graph in the Graphics Compositor (case 1318933).
- 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
- Now reflection probes cannot have SSAO, SSGI, SSR, ray tracing effects or volumetric reprojection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4222,7 +4222,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 @@ -611,6 +611,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 @@ -633,12 +634,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 @@ -668,10 +672,12 @@ 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));

} 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