mischief-render
Safe HaskellNone
LanguageGHC2024

Mischief.Shader.Functions

Documentation

sample :: Expr 'TTexture -> Expr 'TSampler -> Vec 2 Float -> Vec 4 Float Source #

unsafeCall :: forall (a :: Types). SingI a => Text -> [Param] -> Expr a Source #

(&) :: forall (a :: Types). (Algebric a ~ 'True, Integral a ~ 'True) => Expr a -> Expr a -> Expr a Source #

class Num (a :: Types) where Source #

Minimal complete definition

Nothing

Methods

(+) :: Expr a -> Expr a -> Expr a Source #

(-) :: Expr a -> Expr a -> Expr a Source #

(*) :: Expr a -> Expr a -> Expr a Source #

(^+) :: forall (n :: Nat) (a :: PrimitiveTypes). Expr ('VectorType n a) -> Expr ('Primitive a) -> Expr ('VectorType n a) Source #

(+^) :: forall (a :: PrimitiveTypes) (n :: Nat). Expr ('Primitive a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

(^-) :: forall (n :: Nat) (a :: PrimitiveTypes). Expr ('VectorType n a) -> Expr ('Primitive a) -> Expr ('VectorType n a) Source #

(-^) :: forall (a :: PrimitiveTypes) (n :: Nat). Expr ('Primitive a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

(^*) :: forall (n :: Nat) (a :: PrimitiveTypes). Expr ('VectorType n a) -> Expr ('Primitive a) -> Expr ('VectorType n a) Source #

(*^) :: forall (a :: PrimitiveTypes) (n :: Nat). Expr ('Primitive a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

(*!) :: forall (n :: Nat) (m :: Nat). Float -> Mat n m -> Mat n m Source #

(!*) :: forall (n :: Nat) (m :: Nat). Mat n m -> Float -> Mat n m Source #

(^*!) :: forall (m :: Nat) (n :: Nat). Vec m Float -> Mat n m -> Vec n Float Source #

(!*^) :: forall (n :: Nat) (m :: Nat). Mat n m -> Vec n Float -> Vec m Float Source #

(!*!) :: forall (k :: Nat) (r :: Nat) (c :: Nat). Mat k r -> Mat c k -> Mat c r Source #

class Div (a :: Types) where Source #

Minimal complete definition

Nothing

Methods

(/) :: Expr a -> Expr a -> Expr a Source #

Instances

Instances details
Algebric a ~ 'True => Div a Source # 
Instance details

Defined in Mischief.Shader.Functions

Methods

(/) :: Expr a -> Expr a -> Expr a Source #

(^/) :: forall (n :: Nat) (a :: PrimitiveTypes). Expr ('VectorType n a) -> Expr ('Primitive a) -> Expr ('VectorType n a) Source #

(/^) :: forall (a :: PrimitiveTypes) (n :: Nat). Expr ('Primitive a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

class Modulo (a :: Types) where Source #

Minimal complete definition

Nothing

Methods

(%) :: Expr a -> Expr a -> Expr a Source #

Instances

Instances details
Integral a ~ 'True => Modulo a Source # 
Instance details

Defined in Mischief.Shader.Functions

Methods

(%) :: Expr a -> Expr a -> Expr a Source #

(^%) :: forall (a :: PrimitiveTypes) (n :: Nat). Integral ('Primitive a) ~ 'True => Expr ('VectorType n a) -> Expr ('Primitive a) -> Expr ('VectorType n a) Source #

(%^) :: forall (a :: PrimitiveTypes) (n :: Nat). Integral ('Primitive a) ~ 'True => Expr ('Primitive a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

abs :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a Source #

acos :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

acosh :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

asin :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a Source #

asinh :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a Source #

atan :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

atanh :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

atan2 :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a -> Expr a Source #

ceil :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

clamp :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a -> Expr a -> Expr a Source #

cos :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

cosh :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

countLeadingZeros :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Expr a Source #

countOneBits :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Expr a Source #

countTrailingZeros :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Expr a Source #

cross :: forall (a :: PrimitiveTypes). (SingI ('VectorType 3 a), Fractional (Expr ('Primitive a)) ~ 'True) => Expr ('VectorType 3 a) -> Expr ('VectorType 3 a) -> Expr ('VectorType 3 a) Source #

degrees :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

determinant :: forall (n :: Nat). SingI n => Expr ('MatrixType n n) -> Float Source #

distance :: forall (a :: Types) (b :: PrimitiveTypes). (SingI a, Fractional (Expr a) ~ 'True, VectorOrSingleOf a ~ b) => Expr a -> Expr a -> Expr ('Primitive b) Source #

dot :: forall (n :: Nat) (a :: PrimitiveTypes). (SingI (Expr ('VectorType n a)), SingI a, SingI n, Algebric ('Primitive a) ~ 'True) => Expr ('VectorType n a) -> Expr ('VectorType n a) -> Expr ('Primitive a) Source #

exp :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

exp2 :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

extractBits :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Uint -> Uint -> Expr a Source #

faceForward :: forall (a :: PrimitiveTypes) (n :: Nat). (SingI a, SingI n, Fractional (Expr ('Primitive a)) ~ 'True) => Expr ('VectorType n a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

firstLeadingBit :: forall {k} (a :: Types) (n :: k). (SingI a, SingI n, Integral a ~ 'True) => Expr a -> Expr a Source #

firstTrailingBit :: forall {k} (a :: Types) (n :: k). (SingI a, SingI n, Integral a ~ 'True) => Expr a -> Expr a Source #

floor :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

fma :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a -> Expr a -> Expr a Source #

fract :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

insertBits :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Expr a -> Uint -> Uint -> Expr a Source #

inverseSqrt :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

length :: forall {k} (a :: PrimitiveTypes) (b :: Types) (n :: k). (SingI a, SingI b, SingI n, VectorOrSingleOf b ~ a) => Expr b -> Expr ('Primitive a) Source #

log :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

log2 :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

max :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a -> Expr a Source #

min :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a -> Expr a Source #

class Mix (a :: k) (b :: k1) Source #

Instances

Instances details
Mix (a :: k) (a :: k) Source # 
Instance details

Defined in Mischief.Shader.Functions

mix :: forall (a :: Types) (b :: Types). (SingI a, SingI b, Fractional (Expr a) ~ 'True, Fractional (Expr b) ~ 'True, Mix a b) => Expr a -> Expr a -> Expr b -> Expr a Source #

normalize :: forall (n :: Nat) (a :: PrimitiveTypes). (SingI n, SingI a, Fractional (Expr ('VectorType n a)) ~ 'True) => Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

pow :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a -> Expr a Source #

quantizeToF16 :: forall (a :: Types). (SingI a, VectorOrSingleOf a ~ 'TFloat) => Expr a -> Expr a Source #

radians :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

reflect :: forall (n :: Nat) (a :: PrimitiveTypes). (SingI n, SingI a, Fractional (Expr ('VectorType n a)) ~ 'True) => Expr ('VectorType n a) -> Expr ('VectorType n a) -> Expr ('VectorType n a) Source #

refract :: forall (a :: Types) (b :: PrimitiveTypes). (SingI a, SingI b, VectorOrSingleOf a ~ b) => Expr a -> Expr a -> Expr ('Primitive b) -> Expr a Source #

reverseBits :: forall (a :: Types). (SingI a, Integral a ~ 'True) => Expr a -> Expr a Source #

round :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

saturate :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

sign :: forall (a :: Types). (SingI a, Algebric a ~ 'True) => Expr a -> Expr a Source #

sin :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

sinh :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

smoothstep :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a -> Expr a -> Expr a Source #

sqrt :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

step :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a -> Expr a Source #

tan :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

tanh :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #

transpose :: forall (n :: Nat) (m :: Nat). (SingI n, SingI m) => Expr ('MatrixType n m) -> Expr ('MatrixType m n) Source #

trunc :: forall (a :: Types). (SingI a, Fractional (Expr a) ~ 'True) => Expr a -> Expr a Source #