Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 4 additions & 3 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added Area Light support for Hair and Fabric master nodes.
- Added a fallback for the ray traced directional shadow in case of a transmission (case 1307870).
- Added support for Fabric material in Path Tracing.
- Added Global settings check in Wizard
- Added localization on Wizard window
- Added an info box for micro shadow editor (case 1322830).

### Fixed
- Fixed Intensity Multiplier not affecting realtime global illumination.
Expand Down Expand Up @@ -196,9 +199,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Embed the HDRP config package instead of copying locally, the `Packages` folder is versionned by Collaborate. (case 1276518)
- Improved lighting models for AxF shader area lights.
- Updated Wizard to better handle RenderPipelineAsset in Quality Settings
- Added Global settings check in Wizard
- Added localization on Wizard window
- Added an info box for micro shadow editor (case 1322830).
- Changed default sidedness to double, when a mesh with a mix of single and double-sided materials is added to the ray tracing acceleration structure (case 1323451).

## [11.0.0] - 2020-10-21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer,
// We need to build the instance flag for this renderer
uint instanceFlag = 0x00;

bool singleSided = false;
bool doubleSided = false;
bool materialIsOnlyTransparent = true;
bool hasTransparentSubMaterial = false;

Expand Down Expand Up @@ -207,9 +207,9 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer,
else if (transparentMaterial)
subMeshFlagArray[meshIdx] |= RayTracingSubMeshFlags.UniqueAnyHitCalls;

// Force it to be non single sided if it has the keyword if there is a reason
bool doubleSided = currentMaterial.doubleSidedGI || currentMaterial.IsKeywordEnabled("_DOUBLESIDED_ON");
singleSided |= !doubleSided;
// Check if we want to enable double-sidedness for the mesh
// (note that a mix of single and double-sided materials will result in a double-sided mesh in the AS)
doubleSided |= currentMaterial.doubleSidedGI || currentMaterial.IsKeywordEnabled("_DOUBLESIDED_ON");

// Check if the material has changed since last time we were here
if (!m_MaterialsDirty)
Expand All @@ -229,12 +229,9 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer,
}
}

// If the mesh was not valid, exclude it
// If the mesh was not valid, exclude it (without affecting sidedness)
if (!validMesh)
{
subMeshFlagArray[meshIdx] = RayTracingSubMeshFlags.Disabled;
singleSided = true;
}
}

// If the material is considered opaque, every sub-mesh has to be enabled and with unique any hit calls
Expand Down Expand Up @@ -301,7 +298,7 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer,
if (instanceFlag == 0) return AccelerationStructureStatus.Added;

// Add it to the acceleration structure
m_CurrentRAS.AddInstance(currentRenderer, subMeshFlags: subMeshFlagArray, enableTriangleCulling: singleSided, mask: instanceFlag);
m_CurrentRAS.AddInstance(currentRenderer, subMeshFlags: subMeshFlagArray, enableTriangleCulling: !doubleSided, mask: instanceFlag);

// Indicates that a transform has changed in our scene (mesh or light)
m_TransformDirty |= currentRenderer.transform.hasChanged;
Expand Down