GPipe-2.2.3: Typesafe functional GPU graphics programming

Safe HaskellNone
LanguageHaskell98

Graphics.GPipe.Expr

Contents

Description

This module provides the DSL for shader operations in GPipe. The type S x a is an opaque type that represents a value of type a in a shader stage x, eg S F Float means a floating point value in a fragment stream.

Synopsis

Atomic shader type

data S x a #

Instances

FragmentInput VBool # 

Associated Types

type FragmentFormat VBool :: * #

FragmentInput VWord # 

Associated Types

type FragmentFormat VWord :: * #

FragmentInput VInt # 

Associated Types

type FragmentFormat VInt :: * #

FragmentInput VFloat # 
Floating (S a Float) # 

Methods

pi :: S a Float #

exp :: S a Float -> S a Float #

log :: S a Float -> S a Float #

sqrt :: S a Float -> S a Float #

(**) :: S a Float -> S a Float -> S a Float #

logBase :: S a Float -> S a Float -> S a Float #

sin :: S a Float -> S a Float #

cos :: S a Float -> S a Float #

tan :: S a Float -> S a Float #

asin :: S a Float -> S a Float #

acos :: S a Float -> S a Float #

atan :: S a Float -> S a Float #

sinh :: S a Float -> S a Float #

cosh :: S a Float -> S a Float #

tanh :: S a Float -> S a Float #

asinh :: S a Float -> S a Float #

acosh :: S a Float -> S a Float #

atanh :: S a Float -> S a Float #

log1p :: S a Float -> S a Float #

expm1 :: S a Float -> S a Float #

log1pexp :: S a Float -> S a Float #

log1mexp :: S a Float -> S a Float #

Fractional (S a Float) # 

Methods

(/) :: S a Float -> S a Float -> S a Float #

recip :: S a Float -> S a Float #

fromRational :: Rational -> S a Float #

Num (S a Word) # 

Methods

(+) :: S a Word -> S a Word -> S a Word #

(-) :: S a Word -> S a Word -> S a Word #

(*) :: S a Word -> S a Word -> S a Word #

negate :: S a Word -> S a Word #

abs :: S a Word -> S a Word #

signum :: S a Word -> S a Word #

fromInteger :: Integer -> S a Word #

Num (S a Int) # 

Methods

(+) :: S a Int -> S a Int -> S a Int #

(-) :: S a Int -> S a Int -> S a Int #

(*) :: S a Int -> S a Int -> S a Int #

negate :: S a Int -> S a Int #

abs :: S a Int -> S a Int #

signum :: S a Int -> S a Int #

fromInteger :: Integer -> S a Int #

Num (S a Float) # 

Methods

(+) :: S a Float -> S a Float -> S a Float #

(-) :: S a Float -> S a Float -> S a Float #

(*) :: S a Float -> S a Float -> S a Float #

negate :: S a Float -> S a Float #

abs :: S a Float -> S a Float #

signum :: S a Float -> S a Float #

fromInteger :: Integer -> S a Float #

Boolean (S a Bool) # 

Methods

true :: S a Bool #

false :: S a Bool #

notB :: S a Bool -> S a Bool #

(&&*) :: S a Bool -> S a Bool -> S a Bool #

(||*) :: S a Bool -> S a Bool -> S a Bool #

IfB (S a Bool) # 

Methods

ifB :: (* ~ bool) (BooleanOf (S a Bool)) => bool -> S a Bool -> S a Bool -> S a Bool #

IfB (S a Word) # 

Methods

ifB :: (* ~ bool) (BooleanOf (S a Word)) => bool -> S a Word -> S a Word -> S a Word #

IfB (S a Int) # 

Methods

ifB :: (* ~ bool) (BooleanOf (S a Int)) => bool -> S a Int -> S a Int -> S a Int #

IfB (S a Float) # 

Methods

ifB :: (* ~ bool) (BooleanOf (S a Float)) => bool -> S a Float -> S a Float -> S a Float #

Eq x => EqB (S a x) # 

Methods

(==*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

(/=*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

Ord x => OrdB (S a x) # 

Methods

(<*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

(<=*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

(>*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

(>=*) :: (* ~ bool) (BooleanOf (S a x)) => S a x -> S a x -> bool #

Conjugate (S a Word) # 

Methods

conjugate :: S a Word -> S a Word #

Conjugate (S a Int) # 

Methods

conjugate :: S a Int -> S a Int #

Conjugate (S a Float) # 

Methods

conjugate :: S a Float -> S a Float #

TrivialConjugate (S a Word) # 
TrivialConjugate (S a Int) # 
TrivialConjugate (S a Float) # 
Convert (S x Word) # 

Associated Types

type ConvertFloat (S x Word) :: * #

type ConvertInt (S x Word) :: * #

type ConvertWord (S x Word) :: * #

Methods

toFloat :: S x Word -> ConvertFloat (S x Word) #

toInt :: S x Word -> ConvertInt (S x Word) #

toWord :: S x Word -> ConvertWord (S x Word) #

Convert (S x Int) # 

Associated Types

type ConvertFloat (S x Int) :: * #

type ConvertInt (S x Int) :: * #

type ConvertWord (S x Int) :: * #

Methods

toFloat :: S x Int -> ConvertFloat (S x Int) #

toInt :: S x Int -> ConvertInt (S x Int) #

toWord :: S x Int -> ConvertWord (S x Int) #

Convert (S x Float) # 

Associated Types

type ConvertFloat (S x Float) :: * #

type ConvertInt (S x Float) :: * #

type ConvertWord (S x Float) :: * #

Methods

toFloat :: S x Float -> ConvertFloat (S x Float) #

toInt :: S x Float -> ConvertInt (S x Float) #

toWord :: S x Float -> ConvertWord (S x Float) #

FloatingOrd (S x Float) # 

Methods

clamp :: S x Float -> S x Float -> S x Float -> S x Float #

saturate :: S x Float -> S x Float #

step :: S x Float -> S x Float -> S x Float #

smoothstep :: S x Float -> S x Float -> S x Float -> S x Float #

Real' (S x Float) # 

Methods

rsqrt :: S x Float -> S x Float #

exp2 :: S x Float -> S x Float #

log2 :: S x Float -> S x Float #

floor' :: S x Float -> S x Float #

ceiling' :: S x Float -> S x Float #

fract' :: S x Float -> S x Float #

mod'' :: S x Float -> S x Float -> S x Float #

mix :: S x Float -> S x Float -> S x Float -> S x Float #

atan2' :: S x Float -> S x Float -> S x Float #

Integral' (S a Word) # 

Methods

div' :: S a Word -> S a Word -> S a Word #

mod' :: S a Word -> S a Word -> S a Word #

Integral' (S a Int) # 

Methods

div' :: S a Int -> S a Int -> S a Int #

mod' :: S a Int -> S a Int -> S a Int #

ShaderType (S x Bool) x # 

Associated Types

type ShaderBaseType (S x Bool) :: * #

Methods

toBase :: x -> S x Bool -> ShaderBase (ShaderBaseType (S x Bool)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Bool)) x -> S x Bool #

ShaderType (S x Word) x # 

Associated Types

type ShaderBaseType (S x Word) :: * #

Methods

toBase :: x -> S x Word -> ShaderBase (ShaderBaseType (S x Word)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Word)) x -> S x Word #

ShaderType (S x Int) x # 

Associated Types

type ShaderBaseType (S x Int) :: * #

Methods

toBase :: x -> S x Int -> ShaderBase (ShaderBaseType (S x Int)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Int)) x -> S x Int #

ShaderType (S x Float) x # 

Associated Types

type ShaderBaseType (S x Float) :: * #

Methods

toBase :: x -> S x Float -> ShaderBase (ShaderBaseType (S x Float)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Float)) x -> S x Float #

type FragmentFormat VBool # 
type FragmentFormat VWord # 
type FragmentFormat VInt # 
type FragmentFormat VFloat # 
type BooleanOf (S a x) # 
type BooleanOf (S a x) = S a Bool
type ConvertFloat (S x Word) # 
type ConvertFloat (S x Word) = S x Float
type ConvertFloat (S x Int) # 
type ConvertFloat (S x Int) = S x Float
type ConvertFloat (S x Float) # 
type ConvertFloat (S x Float) = S x Float
type ConvertInt (S x Word) # 
type ConvertInt (S x Word) = S x Int
type ConvertInt (S x Int) # 
type ConvertInt (S x Int) = S x Int
type ConvertInt (S x Float) # 
type ConvertInt (S x Float) = S x Int
type ConvertWord (S x Word) # 
type ConvertWord (S x Word) = S x Word
type ConvertWord (S x Int) # 
type ConvertWord (S x Int) = S x Word
type ConvertWord (S x Float) # 
type ConvertWord (S x Float) = S x Word
type ShaderBaseType (S x Bool) # 
type ShaderBaseType (S x Bool) = S x Bool
type ShaderBaseType (S x Word) # 
type ShaderBaseType (S x Word) = S x Word
type ShaderBaseType (S x Int) # 
type ShaderBaseType (S x Int) = S x Int
type ShaderBaseType (S x Float) # 

data V #

Phantom type used as first argument in S V a that denotes that the shader value is a vertex value

data F #

Phantom type used as first argument in S F a that denotes that the shader value is a fragment value

type VFloat = S V Float #

type VInt = S V Int #

type VWord = S V Word #

type VBool = S V Bool #

type FFloat = S F Float #

type FInt = S F Int #

type FWord = S F Word #

type FBool = S F Bool #

Type classes where the Prelude ones are lacking

class Convert a where #

Provides a common way to convert numeric types to integer and floating point representations.

Minimal complete definition

toFloat, toInt, toWord

Associated Types

type ConvertFloat a #

type ConvertInt a #

type ConvertWord a #

Methods

toFloat :: a -> ConvertFloat a #

Convert to a floating point number.

toInt :: a -> ConvertInt a #

Convert to an integral number, using truncation if necessary.

toWord :: a -> ConvertWord a #

Convert to an unsigned integral number, using truncation if necessary.

Instances

Convert Float # 
Convert Int # 

Associated Types

type ConvertFloat Int :: * #

type ConvertInt Int :: * #

type ConvertWord Int :: * #

Convert Word # 

Associated Types

type ConvertFloat Word :: * #

type ConvertInt Word :: * #

type ConvertWord Word :: * #

Convert (S x Word) # 

Associated Types

type ConvertFloat (S x Word) :: * #

type ConvertInt (S x Word) :: * #

type ConvertWord (S x Word) :: * #

Methods

toFloat :: S x Word -> ConvertFloat (S x Word) #

toInt :: S x Word -> ConvertInt (S x Word) #

toWord :: S x Word -> ConvertWord (S x Word) #

Convert (S x Int) # 

Associated Types

type ConvertFloat (S x Int) :: * #

type ConvertInt (S x Int) :: * #

type ConvertWord (S x Int) :: * #

Methods

toFloat :: S x Int -> ConvertFloat (S x Int) #

toInt :: S x Int -> ConvertInt (S x Int) #

toWord :: S x Int -> ConvertWord (S x Int) #

Convert (S x Float) # 

Associated Types

type ConvertFloat (S x Float) :: * #

type ConvertInt (S x Float) :: * #

type ConvertWord (S x Float) :: * #

Methods

toFloat :: S x Float -> ConvertFloat (S x Float) #

toInt :: S x Float -> ConvertInt (S x Float) #

toWord :: S x Float -> ConvertWord (S x Float) #

class Integral' a where #

Minimal complete definition

div', mod'

Methods

div' :: a -> a -> a #

mod' :: a -> a -> a #

Instances

Integral' Int # 

Methods

div' :: Int -> Int -> Int #

mod' :: Int -> Int -> Int #

Integral' Int8 # 

Methods

div' :: Int8 -> Int8 -> Int8 #

mod' :: Int8 -> Int8 -> Int8 #

Integral' Int16 # 

Methods

div' :: Int16 -> Int16 -> Int16 #

mod' :: Int16 -> Int16 -> Int16 #

Integral' Int32 # 

Methods

div' :: Int32 -> Int32 -> Int32 #

mod' :: Int32 -> Int32 -> Int32 #

Integral' Word # 

Methods

div' :: Word -> Word -> Word #

mod' :: Word -> Word -> Word #

Integral' Word8 # 

Methods

div' :: Word8 -> Word8 -> Word8 #

mod' :: Word8 -> Word8 -> Word8 #

Integral' Word16 # 

Methods

div' :: Word16 -> Word16 -> Word16 #

mod' :: Word16 -> Word16 -> Word16 #

Integral' Word32 # 

Methods

div' :: Word32 -> Word32 -> Word32 #

mod' :: Word32 -> Word32 -> Word32 #

Integral' a => Integral' (V0 a) # 

Methods

div' :: V0 a -> V0 a -> V0 a #

mod' :: V0 a -> V0 a -> V0 a #

Integral' a => Integral' (V4 a) # 

Methods

div' :: V4 a -> V4 a -> V4 a #

mod' :: V4 a -> V4 a -> V4 a #

Integral' a => Integral' (V3 a) # 

Methods

div' :: V3 a -> V3 a -> V3 a #

mod' :: V3 a -> V3 a -> V3 a #

Integral' a => Integral' (V2 a) # 

Methods

div' :: V2 a -> V2 a -> V2 a #

mod' :: V2 a -> V2 a -> V2 a #

Integral' a => Integral' (V1 a) # 

Methods

div' :: V1 a -> V1 a -> V1 a #

mod' :: V1 a -> V1 a -> V1 a #

Integral' (S a Word) # 

Methods

div' :: S a Word -> S a Word -> S a Word #

mod' :: S a Word -> S a Word -> S a Word #

Integral' (S a Int) # 

Methods

div' :: S a Int -> S a Int -> S a Int #

mod' :: S a Int -> S a Int -> S a Int #

class Floating a => Real' a where #

This class provides the GPU functions either not found in Prelude's numerical classes, or that has wrong types. Instances are also provided for normal Floats and Doubles.

Minimal complete definition

(floor' | ceiling'), atan2'

Methods

rsqrt :: a -> a #

exp2 :: a -> a #

log2 :: a -> a #

floor' :: a -> a #

ceiling' :: a -> a #

fract' :: a -> a #

mod'' :: a -> a -> a #

mix :: a -> a -> a -> a #

atan2' :: a -> a -> a #

Instances

Real' Double # 
Real' Float # 
Real' a => Real' (V0 a) # 

Methods

rsqrt :: V0 a -> V0 a #

exp2 :: V0 a -> V0 a #

log2 :: V0 a -> V0 a #

floor' :: V0 a -> V0 a #

ceiling' :: V0 a -> V0 a #

fract' :: V0 a -> V0 a #

mod'' :: V0 a -> V0 a -> V0 a #

mix :: V0 a -> V0 a -> V0 a -> V0 a #

atan2' :: V0 a -> V0 a -> V0 a #

Real' a => Real' (V4 a) # 

Methods

rsqrt :: V4 a -> V4 a #

exp2 :: V4 a -> V4 a #

log2 :: V4 a -> V4 a #

floor' :: V4 a -> V4 a #

ceiling' :: V4 a -> V4 a #

fract' :: V4 a -> V4 a #

mod'' :: V4 a -> V4 a -> V4 a #

mix :: V4 a -> V4 a -> V4 a -> V4 a #

atan2' :: V4 a -> V4 a -> V4 a #

Real' a => Real' (V3 a) # 

Methods

rsqrt :: V3 a -> V3 a #

exp2 :: V3 a -> V3 a #

log2 :: V3 a -> V3 a #

floor' :: V3 a -> V3 a #

ceiling' :: V3 a -> V3 a #

fract' :: V3 a -> V3 a #

mod'' :: V3 a -> V3 a -> V3 a #

mix :: V3 a -> V3 a -> V3 a -> V3 a #

atan2' :: V3 a -> V3 a -> V3 a #

Real' a => Real' (V2 a) # 

Methods

rsqrt :: V2 a -> V2 a #

exp2 :: V2 a -> V2 a #

log2 :: V2 a -> V2 a #

floor' :: V2 a -> V2 a #

ceiling' :: V2 a -> V2 a #

fract' :: V2 a -> V2 a #

mod'' :: V2 a -> V2 a -> V2 a #

mix :: V2 a -> V2 a -> V2 a -> V2 a #

atan2' :: V2 a -> V2 a -> V2 a #

Real' a => Real' (V1 a) # 

Methods

rsqrt :: V1 a -> V1 a #

exp2 :: V1 a -> V1 a #

log2 :: V1 a -> V1 a #

floor' :: V1 a -> V1 a #

ceiling' :: V1 a -> V1 a #

fract' :: V1 a -> V1 a #

mod'' :: V1 a -> V1 a -> V1 a #

mix :: V1 a -> V1 a -> V1 a -> V1 a #

atan2' :: V1 a -> V1 a -> V1 a #

Real' (S x Float) # 

Methods

rsqrt :: S x Float -> S x Float #

exp2 :: S x Float -> S x Float #

log2 :: S x Float -> S x Float #

floor' :: S x Float -> S x Float #

ceiling' :: S x Float -> S x Float #

fract' :: S x Float -> S x Float #

mod'' :: S x Float -> S x Float -> S x Float #

mix :: S x Float -> S x Float -> S x Float -> S x Float #

atan2' :: S x Float -> S x Float -> S x Float #

class (IfB a, OrdB a, Floating a) => FloatingOrd a where #

This class provides various order comparing functions

Methods

clamp :: a -> a -> a -> a #

saturate :: a -> a #

step :: a -> a -> a #

smoothstep :: a -> a -> a -> a #

Instances

FloatingOrd Double # 
FloatingOrd Float # 
FloatingOrd (S x Float) # 

Methods

clamp :: S x Float -> S x Float -> S x Float -> S x Float #

saturate :: S x Float -> S x Float #

step :: S x Float -> S x Float -> S x Float #

smoothstep :: S x Float -> S x Float -> S x Float -> S x Float #

Additional functions

dFdx :: FFloat -> FFloat #

The derivative in x using local differencing of the rasterized value.

dFdy :: FFloat -> FFloat #

The derivative in y using local differencing of the rasterized value.

fwidth :: FFloat -> FFloat #

The sum of the absolute derivative in x and y using local differencing of the rasterized value.

Shader control structures

while :: forall a x. ShaderType a x => (a -> S x Bool) -> (a -> a) -> a -> a #

while f g x will iteratively transform x with g as long as f generates true.

ifThen :: forall a x. ShaderType a x => S x Bool -> (a -> a) -> a -> a #

ifThen c f x will return f x if c evaluates to true or x otherwise.

In most cases functionally equivalent to ifThenElse' but usually generate smaller shader code since the last argument is not inlined into the two branches, which also would affect implicit derivates (e.g. dFdx, dFdy or sampling using SampleAuto)

ifThenElse :: forall a b x. (ShaderType a x, ShaderType b x) => S x Bool -> (a -> b) -> (a -> b) -> a -> b #

ifThenElse c f g x will return f x if c evaluates to true or g x otherwise.

In most cases functionally equivalent to ifThenElse' but usually generate smaller shader code since the last argument is not inlined into the two branches, which also would affect implicit derivates (e.g. dFdx, dFdy or sampling using SampleAuto)

ifThenElse' :: forall a x. ShaderType a x => S x Bool -> a -> a -> a #

Works just like ifB, return second argument if first is true otherwise return third argument.

The difference from ifB is that it in most cases generate more efficient code when a is a compound type (e.g. a tuple or a vector). For simple types such as S x Float, ifThenElse' == ifB.

data ShaderBase a x #

An opaque type

class ShaderType a x where #

Constraint for types that may pass in and out of shader control structures. Define your own instances in terms of others and make sure to make toBase as lazy as possible.

Minimal complete definition

toBase, fromBase

Associated Types

type ShaderBaseType a #

A base type that this type can convert into. Use the ShaderBaseType function on an existing instance of ShaderType to define this in your instance.

Methods

toBase :: x -> a -> ShaderBase (ShaderBaseType a) x #

Convert this type to the shader base type. Make sure this is as lazy as possible (e.g. use tilde (~) on each pattern match).

fromBase :: x -> ShaderBase (ShaderBaseType a) x -> a #

Convert back from the shader base type to this type.

Instances

ShaderType () x # 

Associated Types

type ShaderBaseType () :: * #

Methods

toBase :: x -> () -> ShaderBase (ShaderBaseType ()) x #

fromBase :: x -> ShaderBase (ShaderBaseType ()) x -> () #

ShaderType a x => ShaderType (V0 a) x # 

Associated Types

type ShaderBaseType (V0 a) :: * #

Methods

toBase :: x -> V0 a -> ShaderBase (ShaderBaseType (V0 a)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (V0 a)) x -> V0 a #

ShaderType a x => ShaderType (V4 a) x # 

Associated Types

type ShaderBaseType (V4 a) :: * #

Methods

toBase :: x -> V4 a -> ShaderBase (ShaderBaseType (V4 a)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (V4 a)) x -> V4 a #

ShaderType a x => ShaderType (V3 a) x # 

Associated Types

type ShaderBaseType (V3 a) :: * #

Methods

toBase :: x -> V3 a -> ShaderBase (ShaderBaseType (V3 a)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (V3 a)) x -> V3 a #

ShaderType a x => ShaderType (V2 a) x # 

Associated Types

type ShaderBaseType (V2 a) :: * #

Methods

toBase :: x -> V2 a -> ShaderBase (ShaderBaseType (V2 a)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (V2 a)) x -> V2 a #

ShaderType a x => ShaderType (V1 a) x # 

Associated Types

type ShaderBaseType (V1 a) :: * #

Methods

toBase :: x -> V1 a -> ShaderBase (ShaderBaseType (V1 a)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (V1 a)) x -> V1 a #

(ShaderType a x, ShaderType b x) => ShaderType (a, b) x # 

Associated Types

type ShaderBaseType (a, b) :: * #

Methods

toBase :: x -> (a, b) -> ShaderBase (ShaderBaseType (a, b)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b)) x -> (a, b) #

ShaderType (S x Bool) x # 

Associated Types

type ShaderBaseType (S x Bool) :: * #

Methods

toBase :: x -> S x Bool -> ShaderBase (ShaderBaseType (S x Bool)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Bool)) x -> S x Bool #

ShaderType (S x Word) x # 

Associated Types

type ShaderBaseType (S x Word) :: * #

Methods

toBase :: x -> S x Word -> ShaderBase (ShaderBaseType (S x Word)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Word)) x -> S x Word #

ShaderType (S x Int) x # 

Associated Types

type ShaderBaseType (S x Int) :: * #

Methods

toBase :: x -> S x Int -> ShaderBase (ShaderBaseType (S x Int)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Int)) x -> S x Int #

ShaderType (S x Float) x # 

Associated Types

type ShaderBaseType (S x Float) :: * #

Methods

toBase :: x -> S x Float -> ShaderBase (ShaderBaseType (S x Float)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (S x Float)) x -> S x Float #

(ShaderType a x, ShaderType b x, ShaderType c x) => ShaderType (a, b, c) x # 

Associated Types

type ShaderBaseType (a, b, c) :: * #

Methods

toBase :: x -> (a, b, c) -> ShaderBase (ShaderBaseType (a, b, c)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b, c)) x -> (a, b, c) #

(ShaderType a x, ShaderType b x, ShaderType c x, ShaderType d x) => ShaderType (a, b, c, d) x # 

Associated Types

type ShaderBaseType (a, b, c, d) :: * #

Methods

toBase :: x -> (a, b, c, d) -> ShaderBase (ShaderBaseType (a, b, c, d)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b, c, d)) x -> (a, b, c, d) #

(ShaderType a x, ShaderType b x, ShaderType c x, ShaderType d x, ShaderType e x) => ShaderType (a, b, c, d, e) x # 

Associated Types

type ShaderBaseType (a, b, c, d, e) :: * #

Methods

toBase :: x -> (a, b, c, d, e) -> ShaderBase (ShaderBaseType (a, b, c, d, e)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b, c, d, e)) x -> (a, b, c, d, e) #

(ShaderType a x, ShaderType b x, ShaderType c x, ShaderType d x, ShaderType e x, ShaderType f x) => ShaderType (a, b, c, d, e, f) x # 

Associated Types

type ShaderBaseType (a, b, c, d, e, f) :: * #

Methods

toBase :: x -> (a, b, c, d, e, f) -> ShaderBase (ShaderBaseType (a, b, c, d, e, f)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b, c, d, e, f)) x -> (a, b, c, d, e, f) #

(ShaderType a x, ShaderType b x, ShaderType c x, ShaderType d x, ShaderType e x, ShaderType f x, ShaderType g x) => ShaderType (a, b, c, d, e, f, g) x # 

Associated Types

type ShaderBaseType (a, b, c, d, e, f, g) :: * #

Methods

toBase :: x -> (a, b, c, d, e, f, g) -> ShaderBase (ShaderBaseType (a, b, c, d, e, f, g)) x #

fromBase :: x -> ShaderBase (ShaderBaseType (a, b, c, d, e, f, g)) x -> (a, b, c, d, e, f, g) #