Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
cb9d02a8
Unverified
Commit
cb9d02a8
authored
Jun 19, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 19, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38932 from Calinou/increase-light3d-shadow-bias
Increase the default DirectionalLight3D and OmniLight3D shadow biases
parents
c857d77d
971a0dee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
light_3d.cpp
scene/3d/light_3d.cpp
+6
-1
No files found.
scene/3d/light_3d.cpp
View file @
cb9d02a8
...
...
@@ -424,9 +424,11 @@ DirectionalLight3D::DirectionalLight3D() :
Light3D
(
RenderingServer
::
LIGHT_DIRECTIONAL
)
{
set_param
(
PARAM_SHADOW_MAX_DISTANCE
,
100
);
set_param
(
PARAM_SHADOW_FADE_START
,
0.8
);
// Increase the default shadow bias to better suit most scenes.
// Leave normal bias untouched as it doesn't benefit DirectionalLight3D as much as OmniLight3D.
set_param
(
PARAM_SHADOW_BIAS
,
0.05
);
set_shadow_mode
(
SHADOW_PARALLEL_4_SPLITS
);
set_shadow_depth_range
(
SHADOW_DEPTH_RANGE_STABLE
);
blend_splits
=
false
;
}
...
...
@@ -468,6 +470,9 @@ void OmniLight3D::_bind_methods() {
OmniLight3D
::
OmniLight3D
()
:
Light3D
(
RenderingServer
::
LIGHT_OMNI
)
{
set_shadow_mode
(
SHADOW_CUBE
);
// Increase the default shadow biases to better suit most scenes.
set_param
(
PARAM_SHADOW_BIAS
,
0.1
);
set_param
(
PARAM_SHADOW_NORMAL_BIAS
,
2.0
);
}
String
SpotLight3D
::
get_configuration_warning
()
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment