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
c1fdf0e2
Commit
c1fdf0e2
authored
2 years ago
by
Brad Linden
Browse files
Options
Downloads
Patches
Plain Diff
Fixup mac compatibility for SL-18762 shadowUtil.glsl changes
parent
3a24197c
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
+10
-10
10 additions, 10 deletions
...view/app_settings/shaders/class1/deferred/shadowUtil.glsl
with
10 additions
and
10 deletions
indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
+
10
−
10
View file @
c1fdf0e2
...
...
@@ -59,12 +59,12 @@ float pcfShadow(sampler2DShadow shadowMap, vec3 norm, vec4 stc, float bias_mul,
stc
.
xyz
/=
stc
.
w
;
stc
.
z
+=
offset
*
2
.
0
;
stc
.
x
=
floor
(
stc
.
x
*
shadow_res
.
x
+
fract
(
pos_screen
.
y
*
shadow_res
.
y
))
/
shadow_res
.
x
;
// add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
float
cs
=
texture
(
shadowMap
,
stc
.
xyz
)
.
x
;
float
cs
=
texture
(
shadowMap
,
stc
.
xyz
);
float
shadow
=
cs
*
4
.
0
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
1
.
5
/
shadow_res
.
x
,
0
.
5
/
shadow_res
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
0
.
5
/
shadow_res
.
x
,
-
1
.
5
/
shadow_res
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
1
.
5
/
shadow_res
.
x
,
-
0
.
5
/
shadow_res
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
0
.
5
/
shadow_res
.
x
,
1
.
5
/
shadow_res
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
1
.
5
/
shadow_res
.
x
,
0
.
5
/
shadow_res
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
0
.
5
/
shadow_res
.
x
,
-
1
.
5
/
shadow_res
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
1
.
5
/
shadow_res
.
x
,
-
0
.
5
/
shadow_res
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
0
.
5
/
shadow_res
.
x
,
1
.
5
/
shadow_res
.
y
,
0
.
0
));
return
clamp
(
shadow
*
0
.
125
,
0
.
0
,
1
.
0
);
#else
return
1
.
0
;
...
...
@@ -78,16 +78,16 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float bias_scale, vec2
stc
.
z
+=
spot_shadow_bias
*
bias_scale
;
stc
.
x
=
floor
(
proj_shadow_res
.
x
*
stc
.
x
+
fract
(
pos_screen
.
y
*
0
.
666666666
))
/
proj_shadow_res
.
x
;
// snap
float
cs
=
texture
(
shadowMap
,
stc
.
xyz
)
.
x
;
float
cs
=
texture
(
shadowMap
,
stc
.
xyz
);
float
shadow
=
cs
;
vec2
off
=
1
.
0
/
proj_shadow_res
;
off
.
y
*=
1
.
5
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
off
.
x
*
2
.
0
,
off
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
off
.
x
,
-
off
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
off
.
x
,
off
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
off
.
x
*
2
.
0
,
-
off
.
y
,
0
.
0
))
.
x
;
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
off
.
x
*
2
.
0
,
off
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
off
.
x
,
-
off
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
off
.
x
,
off
.
y
,
0
.
0
));
shadow
+=
texture
(
shadowMap
,
stc
.
xyz
+
vec3
(
-
off
.
x
*
2
.
0
,
-
off
.
y
,
0
.
0
));
return
shadow
*
0
.
2
;
#else
return
1
.
0
;
...
...
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