Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed unneeded cookie texture allocation for cone stop lights.
- Fixed issue when toggling anything in HDRP asset that will produce an error (case 1238155)
- Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly.
- Fixed a cause of NaN when a normal of 0-length is generated (usually via shadergraph).

### Changed
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void GetNormalWS(FragInputs input, float3 normalTS, out float3 normalWS, float3
normalTS.xy *= flipSign;
#endif // _DOUBLESIDED_ON

// We need to normalize as we use mikkt tangent space and this is expected (tangent space is not normalize)
normalWS = normalize(TransformTangentToWorld(normalTS, input.tangentToWorld));
// We need to normalize as we use mikkt tangent space and this is expected (tangent space is not normalized)
normalWS = SafeNormalize(TransformTangentToWorld(normalTS, input.tangentToWorld));

#endif // SURFACE_GRADIENT
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static string Unity_NormalBlend(

return @"
{
Out = normalize($precision3(A.rg + B.rg, A.b * B.b));
Out = SafeNormalize($precision3(A.rg + B.rg, A.b * B.b));
}
";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void GenerateNodeFunction(FunctionRegistry registry, GenerationMode gener
s.AppendLine("$precision3 inToNormal = ((((In + ddx(In)) - In) * crossY) + (((In + ddy(In)) - In) * crossX)) * sign(d);");
s.AppendLine("inToNormal.y *= -1.0;");
s.AppendNewLine();
s.AppendLine("Out = normalize((d * TangentMatrix[2].xyz) - inToNormal);");
s.AppendLine("Out = SafeNormalize((d * TangentMatrix[2].xyz) - inToNormal);");

if(outputSpace == OutputSpace.Tangent)
s.AppendLine("Out = TransformWorldToTangent(Out, TangentMatrix);");
Expand Down