This website works better with JavaScript.
Home
Explore
Help
Sign In
er1n
/
zinnia
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Gamma correction
master
gradient
8 years ago
parent
22e6297c7f
commit
7eace1efe4
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
examples/test/shaders/test.frag
+ 3
- 0
examples/test/shaders/test.frag
View File
@ -96,5 +96,8 @@ void main() {
// color = colormap(iters/MAX_STEPS+0.5);
vec3
p
=
eye
+
dir
*
depth
;
// recast the ray
color
=
shade
(
p
,
mat_idx
)
;
// gamma
color
=
vec4
(
pow
(
clamp
(
color
.
xyz
,
0.0
,
1.0
)
,
vec3
(
0.4545
)
)
,
1.0
)
;
}
Write
Preview
Loading…
Cancel
Save