Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
17b7639f
Commit
17b7639f
authored
Oct 08, 2014
by
Christian Schulte zu Berge
Browse files
Fixed some shaders for Intel HD Graphics compatibility.
parent
71cf711c
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/vectorfield/glsl/particleflowrenderer.frag
View file @
17b7639f
...
...
@@ -25,7 +25,7 @@
#include
"tools/shading.frag"
#include
"tools/transferfunction.frag"
in
vec3
ex_
Velocity
;
in
vec3
ex_
Direction
;
in
float
ex_Transparency
;
out
vec4
out_Color
;
///< outgoing fragment color
...
...
@@ -46,14 +46,14 @@ void main() {
out_Color
=
lookupTF
(
_transferFunction
,
_transferFunctionParams
,
ex_Transparency
);
break
;
case
1
:
// velocity
float
f
=
length
(
ex_
Velocity
);
float
f
=
length
(
ex_
Direction
);
f
-=
_threshold
.
x
;
f
/=
(
_threshold
.
y
-
_threshold
.
x
);
f
*=
_scale
;
out_Color
=
lookupTF
(
_transferFunction
,
_transferFunctionParams
,
f
);
break
;
case
2
:
// direction
out_Color
=
vec4
(
normalize
(
abs
(
ex_
Velocity
)),
1
.
0
);
out_Color
=
vec4
(
normalize
(
abs
(
ex_
Direction
)),
1
.
0
);
break
;
default:
discard
;
...
...
modules/vectorfield/glsl/particleflowrenderer.vert
View file @
17b7639f
...
...
@@ -36,6 +36,7 @@ out vec3 ex_Position;
out
vec3
ex_Velocity
;
out
float
ex_StartTime
;
out
vec3
ex_Direction
;
out
float
ex_Transparency
;
/// Matrix defining model-to-world transformation
...
...
@@ -109,6 +110,7 @@ void render() {
//vec4 normalTmp = (normalMatrix * vec4(in_Normal, 0.0));
// ex_Normal = normalize((normalTmp).xyz);
ex_Direction
=
in_Velocity
;
}
void
main
()
{
...
...
modules/vis/glsl/slicerenderer3d.frag
View file @
17b7639f
...
...
@@ -39,6 +39,6 @@ void main() {
out_Color
=
lookupTF
(
_transferFunction
,
_transferFunctionParams
,
intensity
);
// don't write fragment if fully transparent (in particular don't write to depth buffer!)
if
(
out_Color
==
0
.
0
)
if
(
out_Color
.
a
==
0
.
0
)
discard
;
}
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