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
74be17a4
Commit
74be17a4
authored
Sep 11, 2021
by
Rye Mutt
🍞
Browse files
Speed up CAS shader a bit
parent
7ace801c
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/newview/app_settings/shaders/class1/alchemy/CASF.glsl
View file @
74be17a4
...
...
@@ -84,18 +84,17 @@ void main()
// g h i h
// These are 2.0x bigger (factored out the extra multiply).
vec3
mnRGB
=
min
(
min
(
min
(
d
,
e
),
min
(
f
,
b
)),
h
);
vec3
mnRGB2
=
min
(
m
in
(
min
(
mnRGB
,
a
),
min
(
g
,
c
)),
i
);
vec3
mnRGB
=
min
(
min
(
min
(
d
,
e
),
min
(
f
,
b
)),
h
);
vec3
mnRGB2
=
min
(
m
nRGB
,
min
(
min
(
a
,
c
),
min
(
g
,
i
))
);
mnRGB
+=
mnRGB2
;
vec3
mxRGB
=
max
(
max
(
max
(
d
,
e
),
max
(
f
,
b
)),
h
);
vec3
mxRGB2
=
max
(
m
ax
(
max
(
mxRGB
,
a
),
max
(
g
,
c
)),
i
);
vec3
mxRGB
=
max
(
max
(
max
(
d
,
e
),
max
(
f
,
b
)),
h
);
vec3
mxRGB2
=
max
(
m
xRGB
,
max
(
max
(
a
,
c
),
max
(
g
,
i
))
);
mxRGB
+=
mxRGB2
;
// Smooth minimum distance to signal limit divided by smooth max.
vec3
rcpMxRGB
=
vec3
(
1
)
/
mxRGB
;
vec3
ampRGB
=
clamp
((
min
(
mnRGB
,
2
.
0
-
mxRGB
)
*
rcpMxRGB
),
0
,
1
);
vec3
rcpMxRGB
=
vec3
(
1
)
/
mxRGB
;
vec3
ampRGB
=
clamp
((
min
(
mnRGB
,
2
.
0
-
mxRGB
)
*
rcpMxRGB
),
0
,
1
);
// Shaping amount of sharpening.
ampRGB
=
inversesqrt
(
ampRGB
);
...
...
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