From dcd116a5efdc833973ae4e55b8d78643e69ca6a5 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Mon, 26 Apr 2021 12:55:16 +0200 Subject: [PATCH] Fix issue with Eye shader and area light --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Material/Eye/Eye.hlsl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a0f0029cc18..7d0fcc7845c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -159,6 +159,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed CustomPassUtils scaling issues when used with RTHandles allocated from a RenderTexture. - Fixed ResourceReloader that was not call anymore at pipeline construction - Fixed undo of some properties on light editor. +- Fixed artifact appearing when diffuse and specular normal differ too much for eye shader with area lights ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl index 8656ecefa19..48e061bc501 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl @@ -323,7 +323,7 @@ PreLightData GetPreLightData(float3 V, PositionInputs posInput, inout BSDFData b preLightData.ltcTransformSpecular._m00_m02_m11_m20 = SAMPLE_TEXTURE2D_ARRAY_LOD(_LtcData, s_linear_clamp_sampler, uv, LTCLIGHTINGMODEL_GGX, 0); // Construct a right-handed view-dependent orthogonal basis around the normal - preLightData.orthoBasisViewDiffuseNormal = GetOrthoBasisViewNormal(V, bsdfData.diffuseNormalWS, preLightData.NdotV); + preLightData.orthoBasisViewDiffuseNormal = GetOrthoBasisViewNormal(V, bsdfData.diffuseNormalWS, dot(V, bsdfData.diffuseNormalWS)); preLightData.orthoBasisViewNormal = GetOrthoBasisViewNormal(V, N, preLightData.NdotV); return preLightData;