new PIXI.TextureShader(shaderManager, vertexSrc, fragmentSrc, customUniforms, fragmentSrc)
Name | Type | Description |
---|---|---|
shaderManager |
PIXI.ShaderManager |
The webgl shader manager this shader works for. |
vertexSrc |
string |
optional
The source of the vertex shader. |
fragmentSrc |
string |
optional
The source of the fragment shader. |
customUniforms |
object |
optional
Custom uniforms to use to augment the built-in ones. |
fragmentSrc |
string |
optional
The source of the fragment shader. |
Extends
Members
-
static,constantPIXI.TextureShader.defaultFragmentSrc
-
The default fragment shader source
-
static,constantPIXI.TextureShader.defaultVertexSrc
-
The default vertex shader source
-
fragmentSrcstring
-
The fragment shader as an array of strings
-
readonlyglWebGLRenderingContext
-
The current WebGL drawing context
-
readonlyprogramWebGLProgram
-
The WebGL program.
-
readonlyuidnumber
-
A unique id
-
vertexSrcstring
-
The vertex shader as an array of strings
-
innerfragmentSrcstring
-
The fragment shader.
-
innervertexSrcstring
-
The vertex shader.
Methods
-
inherited cacheAttributeLocations(keys)
-
Caches the locations of the attribute for reuse.
Name Type Description keys
string the attributes to cache
-
inherited cacheUniformLocations(keys)
-
Caches the locations of the uniform for reuse.
Name Type Description keys
string the uniforms to cache
-
inherited compile(){WebGLProgram}
-
Attaches the shaders and creates the program.
Returns:
Type Description WebGLProgram -
Destroys the shader.
-
Creates the shader and uses it
-
inherited initSampler2D()
-
Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)
-
inherited syncUniform(uniform)
-
Adds a new uniform
Name Type Description uniform
object the new uniform to attach
-
inherited syncUniforms()
-
Updates the shader uniform values.