Skip to content

Use correct index for light shadow #6847

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 2 commits into from
Feb 2, 2022
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 @@ -101,6 +101,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed errors about incorrect color spaces in the console when using the Wizzard to fix the project setup (case 1388222).
- Fixed custom pass name being cut when too long in the inspector.
- Fixed vertex color mode Add name whicgh was misleading, renamed to AddSubstract.
- Fixed screen space shadow when multiple lights cast shadows.

## [14.0.0] - 2021-11-17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Shader "Hidden/HDRP/ScreenSpaceShadows"
float3 normalWS = normalData.normalWS;

// Note: we use shading normal here and not GetNormalForShadowBias() as it is not available
return GetDirectionalShadowAttenuation(context.shadowContext, posInput.positionSS.xy, posInput.positionWS, normalWS, _DirectionalShadowIndex, L);
return GetDirectionalShadowAttenuation(context.shadowContext, posInput.positionSS.xy, posInput.positionWS, normalWS, light.shadowIndex, L);
}
ENDHLSL

Expand Down