@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
47 lines (46 loc) • 2.16 kB
TypeScript
/**
* Options to drive shader processing to add support for bind groups and uniform buffers.
*
* @ignore
*/
export class ShaderProcessorOptions {
/**
* Constructs shader processing options, used to process the shader for uniform buffer support.
*
* @param {import('./uniform-buffer-format.js').UniformBufferFormat} [viewUniformFormat] - Format
* of the uniform buffer.
* @param {import('./bind-group-format.js').BindGroupFormat} [viewBindGroupFormat] - Format of
* the bind group.
* @param {import('./vertex-format.js').VertexFormat} [vertexFormat] - Format of the vertex
* buffer.
*/
constructor(viewUniformFormat?: import("./uniform-buffer-format.js").UniformBufferFormat, viewBindGroupFormat?: import("./bind-group-format.js").BindGroupFormat, vertexFormat?: import("./vertex-format.js").VertexFormat);
/** @type {import('./uniform-buffer-format.js').UniformBufferFormat[]} */
uniformFormats: import("./uniform-buffer-format.js").UniformBufferFormat[];
/** @type {import('./bind-group-format.js').BindGroupFormat[]} */
bindGroupFormats: import("./bind-group-format.js").BindGroupFormat[];
/** @type {import('./vertex-format.js').VertexFormat[]} */
vertexFormat: import("./vertex-format.js").VertexFormat[];
/**
* Get the bind group index for the uniform name.
*
* @param {string} name - The name of the uniform.
* @returns {boolean} - Returns true if the uniform exists, false otherwise.
*/
hasUniform(name: string): boolean;
/**
* Get the bind group texture slot for the texture uniform name.
*
* @param {string} name - The name of the texture uniform.
* @returns {boolean} - Returns true if the texture uniform exists, false otherwise.
*/
hasTexture(name: string): boolean;
getVertexElement(semantic: any): any;
/**
* Generate unique key representing the processing options.
*
* @param {import('./graphics-device.js').GraphicsDevice} device - The device.
* @returns {string} - Returns the key.
*/
generateKey(device: import("./graphics-device.js").GraphicsDevice): string;
}