All Rendering States Params - Shader API

Rendering states examples

Backface culling

Cull back faces:


//: state cull_face on

Draw front and back faces:


//: state cull_face off

Blending

No blending, fully opaque objects:


//: state blend none

Standard blending mode for back to front draw order:


//: state blend over

Standard blending mode for back to front draw order. Assume color is pre-multiplied by alpha:


//: state blend over_premult

Additive blending mode:


//: state blend add

Multiplicative blending mode:


//: state blend multiply

Shader sampling locality

By default, document channels are sampled using untransformed texture coordinates for rendering optimizations during painting.

If artifacts appear set the nonlocal state to on .


//: state nonlocal on
recommendation-more-help
4517c71e-0531-47f5-b14d-d3b9de4d0104