mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add Soft Very Low shadow quality mode for 3D
This can be used to improve 3D shadow rendering quality at little performance cost. Unlike the existing Hard setting which is limited to variable shadow blur only, it works with both fixed blur and variable blur.
This commit is contained in:
parent
85a8939fa2
commit
e87ec8ec17
6 changed files with 41 additions and 16 deletions
|
@ -2696,9 +2696,14 @@ void RendererSceneRenderRD::shadows_quality_set(RS::ShadowQuality p_quality) {
|
|||
switch (shadows_quality) {
|
||||
case RS::SHADOW_QUALITY_HARD: {
|
||||
penumbra_shadow_samples = 4;
|
||||
soft_shadow_samples = 1;
|
||||
soft_shadow_samples = 0;
|
||||
shadows_quality_radius = 1.0;
|
||||
} break;
|
||||
case RS::SHADOW_QUALITY_SOFT_VERY_LOW: {
|
||||
penumbra_shadow_samples = 4;
|
||||
soft_shadow_samples = 1;
|
||||
shadows_quality_radius = 1.5;
|
||||
} break;
|
||||
case RS::SHADOW_QUALITY_SOFT_LOW: {
|
||||
penumbra_shadow_samples = 8;
|
||||
soft_shadow_samples = 4;
|
||||
|
@ -2738,9 +2743,14 @@ void RendererSceneRenderRD::directional_shadow_quality_set(RS::ShadowQuality p_q
|
|||
switch (directional_shadow_quality) {
|
||||
case RS::SHADOW_QUALITY_HARD: {
|
||||
directional_penumbra_shadow_samples = 4;
|
||||
directional_soft_shadow_samples = 1;
|
||||
directional_soft_shadow_samples = 0;
|
||||
directional_shadow_quality_radius = 1.0;
|
||||
} break;
|
||||
case RS::SHADOW_QUALITY_SOFT_VERY_LOW: {
|
||||
directional_penumbra_shadow_samples = 4;
|
||||
directional_soft_shadow_samples = 1;
|
||||
directional_shadow_quality_radius = 1.5;
|
||||
} break;
|
||||
case RS::SHADOW_QUALITY_SOFT_LOW: {
|
||||
directional_penumbra_shadow_samples = 8;
|
||||
directional_soft_shadow_samples = 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue