Shader

clay.Resourceclay.graphics.Shader (Class) → backend.ShaderImpl

Instance Members

vertSource: String

Source code of vertex shader (glsl language on GL targets)


fragSource: String

Source code of fragment shader (glsl language on GL targets)


attributes: Array<String>

A list of ordered attribute names that will be assigned indexes in the order of the array. (GL.bindAttribLocation() or similar)


textures: Array<String>

A list of ordered texture uniform names that will be assigned indexes in the order of the array. (GL.uniform1i() or similar)


uniforms: Uniforms

Shader uniforms / named parameters.


gpuShader: clay.GpuShader

Reference to the actual GPU shader


init(): Void

Call init() after you have set vertSource and fragSource properties. (and optionally: attributes and textures properties)


activate(): Void

destroy(): Void

new(): Void