summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-05-14 21:30:25 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-05-14 21:32:11 -0400
commit20a8d2d7b17d5b2239333eb67449e631fa28c7a3 (patch)
tree0fbd48fe41d30c70d718a8b249208cdca0889cd9
parent168b0f8cb9bdcf9d1983aee5c89543bb940790ef (diff)
graphics: color: Do not clamp color values to [0, 1] range.HEADmaster
Not doing so allows for high dynamic range color manipulation.
-rw-r--r--chickadee/graphics/color.scm7
1 files changed, 1 insertions, 6 deletions
diff --git a/chickadee/graphics/color.scm b/chickadee/graphics/color.scm
index a43c7f0..fc7a1d6 100644
--- a/chickadee/graphics/color.scm
+++ b/chickadee/graphics/color.scm
@@ -142,12 +142,7 @@
(f32vector-ref (unwrap-color color) 3))
(define* (make-color r g b #:optional (a 1.0))
- (wrap-color
- (f32vector
- (clamp 0.0 1.0 r)
- (clamp 0.0 1.0 g)
- (clamp 0.0 1.0 b)
- (clamp 0.0 1.0 a))))
+ (wrap-color (f32vector r g b a)))
(define* (make-color8 r g b #:optional (a 255))
(make-color (/ r 255.0) (/ g 255.0) (/ b 255.0) (/ a 255.0)))