Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
c061d567
Commit
c061d567
authored
Dec 10, 2013
by
Alexander Wiebel
Browse files
[STYLE
#42
] added missing spaces
parent
25ca1db0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/modules/surfaceIllustrator/shaders/WMSurfaceIllustrator-fragment.glsl
...aceIllustrator/shaders/WMSurfaceIllustrator-fragment.glsl
+7
-4
No files found.
src/modules/surfaceIllustrator/shaders/WMSurfaceIllustrator-fragment.glsl
View file @
c061d567
...
...
@@ -50,6 +50,7 @@ uniform float u_parameterWidth;
void
main
()
{
vec4
col
=
gl_Color
;
//col.rgb = vec3( .7);
float
widthHalf
=
u_parameterWidth
/
2
.
0
;
// Streamribbon
...
...
@@ -59,11 +60,11 @@ void main()
//if( col.g > u_parameterCenter + widthHalf || col.g < u_parameterCenter - widthHalf) discard;
// Slab
if
(
verpos
.
x
>
u_parameterCenter
+
widthHalf
||
verpos
.
x
<
u_parameterCenter
-
widthHalf
)
discard
;
//
if( verpos.x > u_parameterCenter + widthHalf || verpos.x < u_parameterCenter - widthHalf ) discard;
// calculate lighting
float
light
=
blinnPhongIlluminationIntensity
(
normalize
(
-
v_normal
)
);
col
*=
light
;
col
*=
light
;
// finally, apply opacity
col
.
a
=
u_opacity
*
0
.
01
;
...
...
@@ -72,9 +73,11 @@ void main()
float
dotNorm
=
dot
(
vec3
(
0
.
0
,
0
.
0
,
1
.
0
),
normal
);
dotNorm
*=
sign
(
dotNorm
);
// View-dependent transparency
//col.a
=1-
dotNorm
*
dotNorm;
//col.a
= 1 -
dotNorm
*
dotNorm;
// Unnatural opposite effect
//col.a=dotNorm*dotNorm;
col
.
a
=
dotNorm
*
dotNorm
;
gl_FragColor
=
col
;
}
Write
Preview
Markdown
is supported
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