#

API Docs for: 1.5.0
Show: Inherited Protected Private Deprecated

# PixiShader Class

Defined in: `src/pixi/renderers/webgl/shaders/PixiShader.js:6`
Module: PIXI

## Constructor

### `PixiShader`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:6`

- Index
- Methods
- Properties

## Item Index

### Methods

- destroy
- init
- initSampler2D
- initUniforms
- syncUniforms

### Properties

- defaultVertexSrc
- fragmentSrc - The fragment shader.
- gl
- program - The WebGL program.
- textureCount - A local texture counter for multi-texture shaders.

## Methods

### `destroy`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:303`

Destroys the shader

### `init`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:46`

Initialises the shader

### `initSampler2D`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:171`

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

### `initUniforms`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:98`

Initialises the shader uniform values. Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

### `syncUniforms`

()

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:246`

Updates the shader uniform values.

## Properties

### `defaultVertexSrc`

String

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:316`

The Default Vertex shader source

### `fragmentSrc - The fragment shader.`

Array

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:23`

### `gl`

WebGLContext

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:12`

### `program - The WebGL program.`

Any

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:18`

### `textureCount - A local texture counter for multi-texture shaders.`

Number

Defined in `src/pixi/renderers/webgl/shaders/PixiShader.js:36`