-
Notifications
You must be signed in to change notification settings - Fork 849
Cleanup area shadow code and Macro + remove more Raytracing macro #945
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
Changes from all commits
c006e6d
9c1b657
7e888c7
60f5c5d
0b50b33
29b9a12
3bc4d52
547f9a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ The shader function `SampleShadow_PCSS` now requires you to pass in an additiona | |
|
||
From Unity 2020.2, due to the change of shadow map, the enum HDShadowFilteringQuality have been moved to HDShadowManager.cs and the variables ShaderConfig.s_DeferredShadowFiltering as well as the option ShaderOptions.DeferredShadowFiltering have been removed from the code as they have no impact anymore. | ||
|
||
From Unity 2020.2, a new option is available name ColoredShadow. It allow to control if the shadow will be chromatic or monochrome. ColoredShadow have a performance cost. ColoredShadow are the default and currently only work with Raytrace shadow. | ||
|
||
## Shader code | ||
|
||
|
@@ -72,6 +73,9 @@ BSDFData bsdfData = ConvertSurfaceDataToBSDFData(posInput.positionSS, surfaceDat | |
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData); | ||
``` | ||
|
||
|
||
From Unity 2020.2, a new rectangular area shadow have been introduce EvaluateShadow_RectArea and the function GetAreaLightAttenuation() have been rename to GetRectAreaShadowAttenuation(). Also the type DirectionalShadowType have been renamed SHADOW_TYPE. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From Unity 2020.2, HDRP includes a new rectangular area shadow, EvaluateShadow_RectArea. The GetAreaLightAttenuation() function has been renamed to GetRectAreaShadowAttenuation(). Also the type DirectionalShadowType have been renamed SHADOW_TYPE. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks |
||
|
||
## Custom pass API | ||
|
||
The signature of the Execute function has changed to simplify the parameters, now it only takes a CustomPassContext as its input: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// This file was automatically generated. Please don't edit by hand. | ||
// | ||
|
||
#ifndef SCREENSPACEGLOBALILLUMINATION_CS_HLSL | ||
#define SCREENSPACEGLOBALILLUMINATION_CS_HLSL | ||
// | ||
// UnityEngine.Rendering.HighDefinition.IndirectDiffuseMode: static fields | ||
// | ||
#define INDIRECTDIFFUSEMODE_OFF (0) | ||
#define INDIRECTDIFFUSEMODE_SCREEN_SPACE (1) | ||
#define INDIRECTDIFFUSEMODE_RAYTRACE (2) | ||
|
||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Unity 2020.2, a new option is available named ColoredShadow. It allows you to control whether a shadow is chromatic or monochrome. ColoredShadow is enabled by default and currently only works with Ray-traced shadows. Note that colored shadows are more resource-intensive to process than standard shadows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks