Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
4f724f63
Commit
4f724f63
authored
6 years ago
by
Graham Linden
Browse files
Options
Downloads
Patches
Plain Diff
SL-10732
Fix accum of shadow weights and handling of clipped areas in spot shadow sampling.
parent
b5bcba51
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
+5
-1
5 additions, 1 deletion
...view/app_settings/shaders/class1/deferred/shadowUtil.glsl
with
5 additions
and
1 deletion
indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
+
5
−
1
View file @
4f724f63
...
@@ -161,7 +161,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
...
@@ -161,7 +161,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
float
sampleSpotShadow
(
vec3
pos
,
vec3
norm
,
int
index
,
vec2
pos_screen
)
float
sampleSpotShadow
(
vec3
pos
,
vec3
norm
,
int
index
,
vec2
pos_screen
)
{
{
float
shadow
=
1
.
0
f
;
float
shadow
=
0
.
0
f
;
pos
+=
norm
*
spot_shadow_offset
;
pos
+=
norm
*
spot_shadow_offset
;
vec4
spos
=
vec4
(
pos
,
1
.
0
);
vec4
spos
=
vec4
(
pos
,
1
.
0
);
...
@@ -194,6 +194,10 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen)
...
@@ -194,6 +194,10 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen)
shadow
/=
weight
;
shadow
/=
weight
;
}
}
else
{
shadow
=
1
.
0
f
;
}
return
shadow
;
return
shadow
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment