ShaderPass
Index
Constructors
constructor
Parameters
options: ShaderPassOptions
Returns ShaderPass
Properties
publicreadonlyfiltering
Filtering used by ShaderPipeline for this pass's intermediate framebuffer
publicreadonlyname
publicreadonlyscale
Relative resolution used by ShaderPipeline for this pass's intermediate framebuffer
Accessors
publicuniforms
Declarative uniforms for this pass, changes are uploaded on the next draw
Returns UniformDictionary
Methods
publicdispose
Deletes the compiled shader program, the pass cannot be used afterwards
Returns void
publicdraw
Draws the pass,
sourcebinds asu_imageParameters
source: ShaderPassSource
destination: ShaderPassDestination
Returns void
A single shader pass: draws a full-destination quad with a fragment shader, reading explicit sources and writing to an explicit destination.
const tint = new ex.ShaderPass({ graphicsContext, fragmentSource: myGlsl }); tint.draw(sourceFramebuffer, destinationFramebuffer); // multiple named sources + per-draw uniforms merge.draw({ sources: { u_smaller: quarterRes, u_larger: halfRes }, destination: halfResOut, uniforms: { u_strength: 2 } });There is no hidden bind state to sequence, each draw states its inputs and output.