Stability | experimental |
---|---|
Maintainer | conal@conal.net |
Generate and compile vertex and fragment shaders. Unlike
Shady.CompileE, this version allows a looser structure to
the inputs & outputs of shaders, according to FromE
. You can use
the types and compile
in this module, or just shaders
, along with
Shady.CompileE, e.g., compile (shaders sh)
.
- shaders :: forall u' a' o'. (FromE u', FromE a', FromE o') => (o ~ ExpT o', a ~ ExpT a', u ~ ExpT u') => (HasExpr o, HasType o, Show o) => (u' -> a' :-> o') -> u :=> (a :-> o)
- type Pos = R4
- data a' :-> o' = forall v' v . (FromE v', v ~ ExpT v', HasType v, HasExpr v, PrettyPrec v) => ShaderVF (a' :-^ v') (v' :-* o')
- type ShaderVF a' = a' :-> ()
- data GLSL u a
- shaderProgram :: forall u' a' u a. (FromE u', u ~ ExpT u', FromE a', a ~ ExpT a') => (HasType a, HasExpr a, HasType u, HasExpr u) => (u' -> ShaderVF a') -> GLSL u a
Documentation
shaders :: forall u' a' o'. (FromE u', FromE a', FromE o') => (o ~ ExpT o', a ~ ExpT a', u ~ ExpT u') => (HasExpr o, HasType o, Show o) => (u' -> a' :-> o') -> u :=> (a :-> o)Source
Convert loosely structured shaders into single-exp shader
General vertex/fragment shader pair.
GLSL vertex program, fragment program, uniform and vertex attribute.