| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.Render.Material.Definition
Documentation
Instances
Instances
| ShaderParam DefaultVO Source # | |||||
Defined in Mischief.Render.Material.Definition Methods collectParams :: Params paramDefinition :: ParamDefinition collectValues :: DefaultVO GPU -> Values | |||||
| Generic (DefaultVO f) Source # | |||||
Defined in Mischief.Render.Material.Definition Associated Types
| |||||
| type Rep (DefaultVO f) Source # | |||||
Defined in Mischief.Render.Material.Definition type Rep (DefaultVO f) = D1 ('MetaData "DefaultVO" "Mischief.Render.Material.Definition" "mischief-render-0.1.0.0-inplace" 'True) (C1 ('MetaCons "DefaultVO" 'PrefixI 'True) (S1 ('MetaSel ('Just "pos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BuiltIn f "position" (Vec 4 Float))))) | |||||
class (Bindable (B a), ShaderParam (VI a), ShaderParam (VO a), Extension (Extends a), Typeable a, Typeable (B a), Typeable (VI a), Typeable (VO a), Typeable (Extends a), Typeable (IsPhantom a)) => Material a where Source #
Minimal complete definition
Associated Types
type VI a :: Type -> Type Source #
type VO a :: Type -> Type Source #
type B a :: Type -> Type Source #
type Extends a :: [Type] Source #
type Extandable a :: Bool Source #
type Extandable a = 'True
Methods
vertex :: VI a GPU -> Shader a (VO a GPU) Source #
fragment :: VO a GPU -> Shader a (Vec 4 Float) Source #
fetch :: FetchBindings (B a) Source #
Instances
| Material FullscreenMaterial Source # | |||||||||||||||||||||||||
Defined in Mischief.Materials.Fullscreen Associated Types
Methods vertex :: VI FullscreenMaterial GPU -> Shader FullscreenMaterial (VO FullscreenMaterial GPU) Source # fragment :: VO FullscreenMaterial GPU -> Shader FullscreenMaterial (Vec 4 Float) Source # | |||||||||||||||||||||||||
| Material CustomMat Source # | |||||||||||||||||||||||||
Defined in Mischief.Materials.Sprite Associated Types
| |||||||||||||||||||||||||
| Material SpriteMaterial Source # | |||||||||||||||||||||||||
Defined in Mischief.Materials.Sprite Associated Types
Methods vertex :: VI SpriteMaterial GPU -> Shader SpriteMaterial (VO SpriteMaterial GPU) Source # fragment :: VO SpriteMaterial GPU -> Shader SpriteMaterial (Vec 4 Float) Source # fetch :: FetchBindings (B SpriteMaterial) Source # | |||||||||||||||||||||||||
| Material TimeMaterial Source # | |||||||||||||||||||||||||
Defined in Mischief.Materials.Time Associated Types
Methods vertex :: VI TimeMaterial GPU -> Shader TimeMaterial (VO TimeMaterial GPU) Source # fragment :: VO TimeMaterial GPU -> Shader TimeMaterial (Vec 4 Float) Source # fetch :: FetchBindings (B TimeMaterial) Source # | |||||||||||||||||||||||||
| Material ClearMaterial Source # | |||||||||||||||||||||||||
Defined in Mischief.Render.Plugin Associated Types
Methods vertex :: VI ClearMaterial GPU -> Shader ClearMaterial (VO ClearMaterial GPU) Source # fragment :: VO ClearMaterial GPU -> Shader ClearMaterial (Vec 4 Float) Source # fetch :: FetchBindings (B ClearMaterial) Source # | |||||||||||||||||||||||||
| Material DummyFullscreenMaterial Source # | |||||||||||||||||||||||||
Defined in Mischief.Render.Plugin Associated Types
| |||||||||||||||||||||||||
data PhantomMaterial Source #
Constructors
| PhantomMaterial |
Instances
| Component PhantomMaterial Source # | |||||
Defined in Mischief.Render.Material.Definition Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook PhantomMaterial] # onSet :: [Hook PhantomMaterial] # onRemove :: [Hook PhantomMaterial] # onAddRel :: [HookRel PhantomMaterial] # onSetRel :: [HookRel PhantomMaterial] # | |||||
| type IsExclusiveRel PhantomMaterial Source # | |||||
Defined in Mischief.Render.Material.Definition | |||||
data MaterialType where Source #
Constructors
| MaterialType :: forall m. Material m => Proxy m -> MaterialType |
Instances
| Component MaterialType Source # | |||||
Defined in Mischief.Render.Material.Definition Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook MaterialType] # onSet :: [Hook MaterialType] # onRemove :: [Hook MaterialType] # onAddRel :: [HookRel MaterialType] # onSetRel :: [HookRel MaterialType] # onRemoveRel :: [HookRel MaterialType] # | |||||
| type IsExclusiveRel MaterialType Source # | |||||
Defined in Mischief.Render.Material.Definition | |||||
data NoMaterial Source #
class Extension (a :: [Type]) where Source #
Methods
collectExtBindings :: Set ErasedBinding Source #
Instances
| Extension ('[] :: [Type]) Source # | |
Defined in Mischief.Render.Material.Definition Methods collectExtBindings :: Set ErasedBinding Source # | |
| (Extension xs, Material a) => Extension (a ': xs) Source # | |
Defined in Mischief.Render.Material.Definition Methods collectExtBindings :: Set ErasedBinding Source # | |
collectBindings :: Material m => Set ErasedBinding Source #
type ExtensionOf a b = (Material a, IsExtensionOf a b ~ 'True) Source #
type family IsExtensionOf a b :: Bool where ... Source #
Equations
| IsExtensionOf a NoMaterial = 'True | |
| IsExtensionOf a b = IsExtensionOf' '[a] b |
type family IsExtensionOf' (m :: [Type]) target :: Bool where ... Source #
Equations
| IsExtensionOf' ('[] :: [Type]) a = 'False | |
| IsExtensionOf' (a ': xs) a = 'True | |
| IsExtensionOf' (a ': xs) t = Or (IsExtensionOf' (Extends a) t) (IsExtensionOf' xs t) |
convertFrag :: (VO m GPU -> Shader m (Vec 4 Float)) -> VO m GPU -> Shader m (FragmentOutput GPU) Source #
data FetchBindings (b :: Type -> Type) where Source #
Constructors
| FetchBindings | |
Fields
| |
newtype FragmentOutput f Source #
Constructors
| FragmentOutput | |
Instances
| ShaderParam FragmentOutput Source # | |||||
Defined in Mischief.Render.Material.Definition Methods collectParams :: Params paramDefinition :: ParamDefinition dummyParam :: FragmentOutput GPU collectValues :: FragmentOutput GPU -> Values | |||||
| Generic (FragmentOutput f) Source # | |||||
Defined in Mischief.Render.Material.Definition Associated Types
Methods from :: FragmentOutput f -> Rep (FragmentOutput f) x # to :: Rep (FragmentOutput f) x -> FragmentOutput f # | |||||
| type Rep (FragmentOutput f) Source # | |||||
Defined in Mischief.Render.Material.Definition type Rep (FragmentOutput f) = D1 ('MetaData "FragmentOutput" "Mischief.Render.Material.Definition" "mischief-render-0.1.0.0-inplace" 'True) (C1 ('MetaCons "FragmentOutput" 'PrefixI 'True) (S1 ('MetaSel ('Just "fragOut1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Location f 0 (Vec 4 Float))))) | |||||
data DrawCommand (bindings :: k) Source #
drawCommand :: Material m => RenderDevice -> Ptr WGPURenderPassEncoder -> BindLayout -> DrawCommand (B m) -> IO () Source #
render :: Material mat => RenderDevice -> RenderQueue -> RenderPipeline -> RenderOptions -> Texture -> [DrawCommand (B mat)] -> System () Source #
data RenderOptions Source #
Constructors
| RenderOptions | |
Instances
| Default RenderOptions Source # | |
Defined in Mischief.Render.Material.Definition Methods def :: RenderOptions # | |