shady-graphics-0.5.0: Functional GPU programming - DSEL & compiler

Stabilityexperimental
Maintainerconal@conal.net

Shady.Image

Contents

Description

Images (infinite & continuous)

Synopsis

Documentation

type FilterG p a = Unop (p -> a)Source

Generalized filter, polymorphic over domain

type Filter a = FilterG Point aSource

Image filter

samplerIm :: Sampler2 :=> Image ColorSource

Wrap up a sampler as an image

uscale2 :: (Floating s, ITrans (Complex s) a) => s -> Unop aSource

rotate2 :: (Floating s, ITrans (Complex s) a) => s -> Unop aSource

bilerp :: VectorSpace w => w -> w -> w -> w -> (Scalar w, Scalar w) -> wSource

Bilinear interpolation

bilerpC :: (VectorSpace w, Scalar w ~ s) => w -> w -> w -> w -> ImageG s wSource

Bilinear interpolation image

type ImageG s a = Complex s -> aSource

Generalized image -- continuous & infinite

type Image a = ImageG FloatE aSource

Continuous, infinite image

General regions

type PRegion p = p -> BoolESource

Region over general space

type Region = Image BoolESource

2D spatial region

eqF :: (IsNat n, IsScalar a, Eq a, Applicative f) => f (VecE n a) -> f (VecE n a) -> f BoolESource

neqF :: (IsNat n, IsScalar a, Eq a, Applicative f) => f (VecE n a) -> f (VecE n a) -> f BoolESource

udisk :: (InnerSpace p, Scalar p ~ FloatE) => PRegion pSource

Generalized unit disk/ball

disk :: (InnerSpace p, Scalar p ~ FloatE) => FloatE -> PRegion pSource

Generalized disk/ball, given radius

annulus :: (InnerSpace p, Scalar p ~ FloatE) => FloatE -> FloatE -> PRegion pSource

Generalized annulus, given outer & inner radii

checker :: RegionSource

Checker-board

crop :: (Applicative f, Monoid (f a), IfB bool a) => f bool -> f a -> f a

Crop a function, filling in mempty where the test yeis false.

Space-varying transformations

transformG :: (c -> ITransform p) -> (p -> c) -> Unop (p -> a)Source

General domain-varying transformation.

translate2Im :: AdditiveGroup p => Unop p -> Unop (p -> a)Source

Space-varying translate2

scale2Im :: Fractional s => Unop (Complex s) -> Unop (ImageG s a)Source

Space-varying scale2

uscale2Im :: Fractional s => ImageG s s -> Unop (ImageG s a)Source

Space-varying uscale2

rotate2Im :: Floating s => ImageG s s -> Unop (ImageG s a)Source

Space-varying rotate2

swirl :: Floating s => s -> Unop (ImageG s a)Source

Swirl transformation

utile :: (Frac p, ITrans (Complex s) p, ITrans (Complex s) a, Floating s) => Unop (p -> a)Source

Unit, rectangular tiling.

tile :: (Floating s, Frac s, ITrans (Complex s) a) => Complex s -> Unop (ImageG s a)Source