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
c2b3c504
Commit
c2b3c504
authored
Apr 14, 2010
by
Alexander Wiebel
Browse files
[FIX
#305
] fixed lighting of surfaces
parent
c2d2c9a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/modules/marchingCubes/shaders/surface.fs
src/modules/marchingCubes/shaders/surface.fs
+3
-1
No files found.
src/modules/marchingCubes/shaders/surface.fs
View file @
c2b3c504
...
...
@@ -119,7 +119,9 @@ void main()
if
(
type0
>
0
)
lookupTex
(
col
,
type0
,
tex0
,
threshold0
,
VaryingTexCoord0
.
xyz
,
alpha0
,
useCmap0
);
}
if
(
useLighting
)
col
=
col
+
(
ambient
*
col
/
2
.
0
)
+
(
diffuse
*
col
)
+
(
specular
*
col
/
2
.
0
);
{
col
=
(
ambient
*
col
/
2
.
0
)
+
(
diffuse
*
col
)
+
(
specular
*
col
/
2
.
0
);
}
col
=
clamp
(
col
,
0
.
0
,
1
.
0
);
...
...
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