Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
11 changes: 11 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed the point distribution for the diffuse denoiser sometimes not being properly intialized.
- Fixed the bad blending between the sun and the clouds (case 1373282).
- Fixed and optimize distance shadowmask fade.
- Fixed compilation errors when using Elipse, Rectangle, Polygon, Checkerboard, RoundedPolygon, RoundedRectangle in a ray tracing shader graph (case 1377610).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix changelog

- Fixed outdated documentation about supported GPUs for ray tracing (case 1375895).
- Fixed outdated documentation about recursie ray tracing effects support (case 1374904).
- Fixed Shadow Matte not appearing in ray tracing effects (case 1364005).
- Fixed Crash issue when adding an area light on its own.
- Fixed rendertarget ColorMask in Forward with virtual texturing and transparent motion vectors.
- Fixed light unit conversion after changing mid gray value.
- Fixed Focus distance in path traced depth of field now takes into account the focus mode setting (volume vs camera).
- Fixed stencil buffer resolve when MSAA is enabled so that OR operator is used instead of picking the last sample.
- Fixed HDRP Decals performances when they use different materials (~5x improvement in the decal update loop code).

### Changed
- Use RayTracingAccelerationStructure.CullInstances to filter Renderers and populate the acceleration structure with ray tracing instances for improved CPU performance on the main thread.
Expand All @@ -85,6 +95,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Modified HDRP to use common FSR logic from SRP core.
- Optimized FSR by merging the RCAS logic into the FinalPass shader.
- Integrate a help box to inform users of the potential dependency to directional lights when baking.
- The rendering order of decals that have a similar draw order value was modified. The new order should be the reverse of the previous order.

## [13.1.0] - 2021-09-24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,23 @@ public void UpdateCachedData(DecalHandle handle, DecalProjector decalProjector)
m_CachedFadeFactor[index] = data.fadeFactor;
m_CachedDecalLayerMask[index] = data.decalLayerMask;

UpdateCachedDrawOrder();

UpdateJobArrays(index, decalProjector);
}

public void UpdateCachedDrawOrder()
{
if (this.m_Material.HasProperty(HDShaderIDs._DrawOrder))
{
m_CachedDrawOrder = this.m_Material.GetInt(HDShaderIDs._DrawOrder);
}
else
{
m_CachedDrawOrder = 0;
}
}

// Update memory allocation and assign decal handle, then update cached data
public DecalHandle AddDecal(int materialID, DecalProjector decalProjector)
{
Expand Down Expand Up @@ -821,20 +835,7 @@ public int Count
}
}

public int DrawOrder
{
get
{
if (this.m_Material.HasProperty(HDShaderIDs._DrawOrder))
{
return this.m_Material.GetInt(HDShaderIDs._DrawOrder);
}
else
{
return 0;
}
}
}
public int DrawOrder => m_CachedDrawOrder;

private List<Matrix4x4[]> m_DecalToWorld = new List<Matrix4x4[]>();
private List<Matrix4x4[]> m_NormalToWorld = new List<Matrix4x4[]>();
Expand All @@ -845,6 +846,7 @@ public int DrawOrder
private int m_NumResults = 0;
private int m_InstanceCount = 0;
private int m_DecalsCount = 0;
private int m_CachedDrawOrder = 0;
private Vector2[] m_CachedDrawDistances = new Vector2[kDecalBlockSize]; // x - draw distance, y - fade scale
private Vector2[] m_CachedAngleFade = new Vector2[kDecalBlockSize]; // x - scale fade, y - bias fade
private Vector4[] m_CachedUVScaleBias = new Vector4[kDecalBlockSize]; // xy - scale, zw bias
Expand Down Expand Up @@ -1100,10 +1102,12 @@ public void CreateDrawData()
m_DecalSetsRenderList.Clear();
foreach (var pair in m_DecalSets)
{
pair.Value.UpdateCachedDrawOrder();

if (pair.Value.IsDrawn())
{
int insertIndex = 0;
while ((insertIndex < m_DecalSetsRenderList.Count) && (pair.Value.DrawOrder >= m_DecalSetsRenderList[insertIndex].DrawOrder))
while ((insertIndex < m_DecalSetsRenderList.Count) && (pair.Value.DrawOrder > m_DecalSetsRenderList[insertIndex].DrawOrder))
{
insertIndex++;
}
Expand Down