Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
CAMP
campvis-public
Commits
3e3aabef
Commit
3e3aabef
authored
Jan 11, 2014
by
Christian Schulte zu Berge
Browse files
minor fixes in background shader and GeometryRenderer shader
parent
521cb171
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/glsl/tools/background.frag
View file @
3e3aabef
...
...
@@ -26,6 +26,6 @@ uniform vec4 _backgroundColor1;
uniform
vec4
_backgroundColor2
;
void
renderBackground
(
in
vec2
texCoords
,
out
vec4
outColor
)
{
outColor
=
mix
(
_backgroundColor1
,
_backgroundColor2
,
0
.
7
5
*
texCoords
.
x
*
texCoords
.
y
);
outColor
=
mix
(
_backgroundColor1
,
_backgroundColor2
,
0
.
5
*
(
texCoords
.
x
+
texCoords
.
y
)
)
;
gl_FragDepth
=
1
.
0
;
}
\ No newline at end of file
modules/vis/glsl/geometryrenderer.frag
View file @
3e3aabef
...
...
@@ -57,9 +57,8 @@ void main() {
// Find the smallest distance to the edges
float
d
=
min
(
geom_EdgeDistance
.
x
,
min
(
geom_EdgeDistance
.
y
,
geom_EdgeDistance
.
z
))
*
2
.
0
;
// Determine the mix factor with the line color
float
aliasingWidth
=
min
(
1
.
0
,
(
_lineWidth
/
8
.
0
));
float
mixVal
=
smoothstep
(
_lineWidth
-
aliasingWidth
,
_lineWidth
+
aliasingWidth
,
d
);
// perform anti-aliasing
float
mixVal
=
smoothstep
(
_lineWidth
-
1
.
0
,
_lineWidth
+
1
.
0
,
d
);
// Mix the surface color with the line color
out_Color
=
mix
(
_wireframeColor
,
out_Color
,
mixVal
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment