Sets a sampler2D uniform on this shader.
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.
If you wish to use another Shader as a sampler2D input for this shader, see the Shader.setSampler2DBuffer
method.
name | type | arguments | description |
---|---|---|---|
uniformKey | string |
The key of the sampler2D uniform to be updated, i.e. |
|
textureKey | string |
The key of the texture, as stored in the Texture Manager. Must already be loaded. |
|
textureIndex | number | <optional> |
The texture index. |
textureData | any | <optional> |
Additional texture data. |
This Shader instance.