points.RenderPass(vertexShader, fragmentShader, computeShader)

A RenderPass is a way to have a block of shaders to pass to your application pipeline and these render passes will be executed in the order you pass them in the Points#init method.

Constructor

new RenderPass(vertexShader, fragmentShader, computeShader)

A collection of Vertex, Compute and Fragment shaders that represent a RenderPass. This is useful for PostProcessing.

Parameters:
Name Type Description
vertexShader String

WGSL Vertex Shader in a String.

fragmentShader String

WGSL Fragment Shader in a String.

computeShader String

WGSL Compute Shader in a String.

Source:
RenderPass.js, line 19
Example
import Points, { RenderPass } from 'points';
// vert, frag and compute are strings with the wgsl shaders.
let renderPasses = [
    new RenderPass(vert1, frag1, compute1),
    new RenderPass(vert2, frag2, compute2)
];
// we pass the array of renderPasses
await points.init(renderPasses);

Members

computeShader

get the compute shader content

Source:
RenderPass.js, line 88

fragmentShader

get the fragment shader content

Source:
RenderPass.js, line 95

vertexShader

get the vertex shader content

Source:
RenderPass.js, line 81

MIT

Documentation generated by JSDoc 4.0.4 using Docolatte theme on