Module Shader-PIXI

class type _t = { ... }
type t = Js.t(_t);

A helper class for shaders

module Impl: { ... };
include Impl;
let create: ?⁠program:Js.t(PIXI.Program.#_t) => ?⁠uniforms:'a => unit => t;

creates a new shader

parameter program

The program the shader will use

parameter uniforms

Custom uniforms to use to augment the built-in ones

let getProgram: Js.t(_t) => Js.t(PIXI.Program.#_t);

Program that the shader uses

let setProgram: Js.t(_t) => Js.t(PIXI.Program.#_t) => unit;

Program that the shader uses

let getUniforms: Js.t(_t) => 'a;

Shader uniform values, shortcut for uniformGroup.uniforms

let from: ?⁠vertexSrc:string => ?⁠fragmentSrc:string => ?⁠uniforms:'a => unit => Js.t(_t);

A short hand function to create a shader based of a vertex and fragment shader

parameter vertexSrc

The source of the vertex shader

parameter fragmentSrc

The source of the fragment shader.

parameter uniforms

Custom uniforms to use to augment the built-in ones

returns

a shiny new Pixi shader