Try to add compute shaders
This commit is contained in:
+8
-31
@@ -1,35 +1,11 @@
|
||||
--{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Color (
|
||||
module Color,
|
||||
module Color.Data,
|
||||
) where
|
||||
|
||||
module Color where
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Color.Data
|
||||
import Geometry
|
||||
|
||||
data PaletteColor
|
||||
= RED
|
||||
| GREEN
|
||||
| BLUE
|
||||
| YELLOW
|
||||
| CYAN
|
||||
| MAGENTA
|
||||
| ROSE
|
||||
| VIOLET
|
||||
| AZURE
|
||||
| AQUAMARINE
|
||||
| CHARTREUSE
|
||||
| ORANGE
|
||||
| WHITE
|
||||
| BLACK
|
||||
deriving (Eq, Ord, Enum, Show, Read) --Generic, Flat)
|
||||
|
||||
type RGBA = Point4
|
||||
|
||||
type Color = Point4
|
||||
import Control.Lens
|
||||
|
||||
withAlpha :: Float -> RGBA -> RGBA
|
||||
{-# INLINE withAlpha #-}
|
||||
@@ -165,4 +141,5 @@ numColor _ = toV4 (1, 1, 1, 1)
|
||||
light4 :: Color -> Color
|
||||
light4 = light . light . light . light
|
||||
|
||||
deriveJSON defaultOptions ''PaletteColor
|
||||
toColor256 :: Color -> Color256
|
||||
toColor256 = over each floor . (255 *) . normalizeColor
|
||||
|
||||
Reference in New Issue
Block a user