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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ -135,6 +135,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added CustomPassUtils API to simplify Blur, Copy and DrawRenderers custom passes.
- Added an API in HDRP to override the camera within the rendering of a frame (mainly for custom pass).
- Added more custom pass API functions, mainly to render objects from another camera.
- Added support for transparent Unlit in path tracing.

### Fixed
- Fix when rescale probe all direction below zero (1219246)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,30 @@ void ClosestHit(inout PathIntersection pathIntersection : SV_RayPayload, Attribu
}

#else // HAS_LIGHTLOOP

pathIntersection.value = (!currentDepth || computeDirect) ? bsdfData.color * GetInverseCurrentExposureMultiplier() + builtinData.emissiveColor : 0.0;

// Simulate opacity blending by simply continuing along the current ray
#ifdef _SURFACE_TYPE_TRANSPARENT
if (builtinData.opacity < 1.0)
{
RayDesc rayDescriptor;
rayDescriptor.Origin = GetAbsolutePositionWS(fragInput.positionRWS) - fragInput.tangentToWorld[2] * _RaytracingRayBias;
rayDescriptor.Direction = WorldRayDirection();
rayDescriptor.TMin = 0.0;
rayDescriptor.TMax = FLT_INF;

PathIntersection nextPathIntersection = pathIntersection;
nextPathIntersection.remainingDepth--;

TraceRay(_RaytracingAccelerationStructure, RAY_FLAG_CULL_BACK_FACING_TRIANGLES, RAYTRACINGRENDERERFLAG_PATH_TRACING, 0, 1, 2, rayDescriptor, nextPathIntersection);

pathIntersection.value = lerp(nextPathIntersection.value, pathIntersection.value, builtinData.opacity);
}
#endif

#endif // HAS_LIGHTLOOP

ApplyFogAttenuation(WorldRayOrigin(), WorldRayDirection(), pathIntersection.t, pathIntersection.value, computeDirect);

if (currentDepth)
Expand Down