Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alchemy
Alchemy Next
Commits
a2eefed1
Commit
a2eefed1
authored
Aug 21, 2021
by
Rye Mutt
🍞
Browse files
Fix alpha lighting producing undefined results that are different depending on driver
parent
c9b7f1a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
View file @
a2eefed1
...
...
@@ -216,12 +216,9 @@ void main()
calcAtmosphericVars
(
pos
.
xyz
,
light_dir
,
1
.
0
,
sunlit
,
amblit
,
additive
,
atten
,
false
);
float
da
=
dot
(
norm
.
xyz
,
light_dir
.
xyz
);
da
=
clamp
(
da
,
-
1
.
0
,
1
.
0
);
da
=
pow
(
da
,
1
.
0
/
1
.
3
);
float
final_da
=
da
;
final_da
=
clamp
(
final_da
,
0
.
0
f
,
1
.
0
f
);
float
da
=
clamp
(
dot
(
norm
.
xyz
,
light_dir
.
xyz
),
0
.
0
,
1
.
0
);
da
=
pow
(
da
,
1
.
0
/
1
.
3
);
vec4
color
=
vec4
(
0
.
0
);
...
...
@@ -232,7 +229,7 @@ void main()
ambient
*=
ambient
;
ambient
=
(
1
.
0
-
ambient
);
vec3
sun_contrib
=
min
(
final_
da
,
shadow
)
*
sunlit
;
vec3
sun_contrib
=
min
(
da
,
shadow
)
*
sunlit
;
#if !defined(AMBIENT_KILL)
color
.
rgb
=
amblit
;
...
...
Write
Preview
Supports
Markdown
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