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
294e912a
Commit
294e912a
authored
Aug 22, 2017
by
Juan Linietsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fade last cascade in directional shadow, closes #9779
parent
8ad71396
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
scene.glsl
drivers/gles3/shaders/scene.glsl
+4
-1
No files found.
drivers/gles3/shaders/scene.glsl
View file @
294e912a
...
...
@@ -1694,6 +1694,7 @@ FRAGMENT_SHADER_CODE
if
(
gl_FragCoord
.
w
>
shadow_split_offsets
.
w
)
{
vec3
pssm_coord
;
float
pssm_fade
=
0
.
0
;
#ifdef LIGHT_USE_PSSM_BLEND
float
pssm_blend
;
...
...
@@ -1751,6 +1752,7 @@ FRAGMENT_SHADER_CODE
}
else
{
highp
vec4
splane
=
(
shadow_matrix4
*
vec4
(
vertex
,
1
.
0
));
pssm_coord
=
splane
.
xyz
/
splane
.
w
;
pssm_fade
=
smoothstep
(
shadow_split_offsets
.
z
,
shadow_split_offsets
.
w
,
gl_FragCoord
.
w
);
#if defined(LIGHT_USE_PSSM_BLEND)
use_blend
=
false
;
...
...
@@ -1782,6 +1784,7 @@ FRAGMENT_SHADER_CODE
}
else
{
highp
vec4
splane
=
(
shadow_matrix2
*
vec4
(
vertex
,
1
.
0
));
pssm_coord
=
splane
.
xyz
/
splane
.
w
;
pssm_fade
=
smoothstep
(
shadow_split_offsets
.
x
,
shadow_split_offsets
.
y
,
gl_FragCoord
.
w
);
#if defined(LIGHT_USE_PSSM_BLEND)
use_blend
=
false
;
...
...
@@ -1818,7 +1821,7 @@ FRAGMENT_SHADER_CODE
}
#endif
light_attenuation
=
mix
(
shadow_color_contact
.
rgb
,
vec3
(
1
.
0
),
shadow
);
light_attenuation
=
mix
(
mix
(
shadow_color_contact
.
rgb
,
vec3
(
1
.
0
),
shadow
),
vec3
(
1
.
0
),
pssm_fade
);
}
...
...
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