Skip to content

[HDRP][Path Tracing] Fixed transparent unlit #4605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 31, 2021
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
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 @@ -219,6 +219,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed for discrepancies in intensity and saturation between screen space refraction and probe refraction.
- Fixed a divide-by-zero warning for anisotropic shaders (Fabric, Lit).
- Fixed VfX lit particle AOV output color space.
- Fixed path traced transparent unlit material (case 1335500).

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ void ComputeSurfaceScattering(inout PathIntersection pathIntersection : SV_RayPa
if (builtinData.opacity < 1.0)
{
RayDesc rayDescriptor;
rayDescriptor.Origin = GetAbsolutePositionWS(fragInput.positionRWS) - fragInput.tangentToWorld[2] * _RaytracingRayBias;
float bias = dot(WorldRayDirection(), fragInput.tangentToWorld[2]) > 0.0 ? _RaytracingRayBias : -_RaytracingRayBias;
rayDescriptor.Origin = fragInput.positionRWS + bias * fragInput.tangentToWorld[2];
rayDescriptor.Direction = WorldRayDirection();
rayDescriptor.TMin = 0.0;
rayDescriptor.TMax = FLT_INF;
Expand Down