Phaser API Documentation

  Version: 
setChannel0(textureKey, [textureData])

Description:

A short-cut method that will directly set the texture being used by the iChannel0 sampler2D uniform.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.

Parameters:

name type arguments description
textureKey string

The key of the texture, as stored in the Texture Manager. Must already be loaded.

textureData any <optional>

Additional texture data.

Returns:
Description:

This Shader instance.

Since: 3.17.0