ombra-1.1.0.0: Render engine.

LicenseBSD3
Maintainerziocroc@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.Ombra.Stencil

Description

The stencil test lets you manipulate the stencil buffer and discard fragments on the basis of the result of the operation.

Synopsis

Documentation

data Mode Source #

Stencil mode.

Constructors

Mode (Side Function) (Side Operation) 

Instances

Eq Mode Source # 

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

data Side a Source #

Constructors

FrontBack a

Use the same value for both sides.

Separate a a

Use a different value for each side (front and back).

Instances

Eq a => Eq (Side a) Source # 

Methods

(==) :: Side a -> Side a -> Bool #

(/=) :: Side a -> Side a -> Bool #

data Function Source #

Function type, fragment stencil value and mask.

Instances

data FunctionType Source #

Operation to perform between the masked fragment stencil value and the masked destination stencil value.

Constructors

Never

Never pass.

Always

Always pass.

Less

<

LessOrEqual

<=

Greater

>

GreaterOrEqual

>=

Equal

==

NotEqual

/=

data Operation Source #

Operations to perform if the stencil test fails, if the stencil test passes but the depth test fails, and if both the stencil test and the depth test pass.

Instances

data OperationType Source #

Operation to perform to the stencil value in the buffer.

Constructors

Keep

Keep it unchanged.

Invert

Invert it.

Zero

Set it to zero.

Replace

Replace it with the masked fragment value.

Increment

Increment it if not maximum.

Decrement

Decrement it if not zero.

IncWrap

Increment it, wrapping it if it would overflow.

DecWrap

Decrement it, wrapping it if it would underflow.

withStencilMode :: MonadStencil m => Maybe Mode -> m a -> m a Source #