Phaser API Documentation



By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called every time the Pipeline Manager makes this the active pipeline. It is called at the end of the WebGLPipeline.bind method, after the current shader has been set. The current shader is passed to this hook.

For example, if a display list has 3 Sprites in it that all use the same pipeline, this hook will only be called for the first one, as the 2nd and 3rd Sprites do not cause the pipeline to be changed.

If you need to listen for that event instead, use the onBind hook.


name type description
currentShader Phaser.Renderer.WebGL.WebGLShader

The shader that was set as current.

Since: 3.50.0