UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

48 lines (47 loc) 2.62 kB
import type { ShaderLanguage } from "../../Materials/shaderLanguage.js"; import type { Nullable } from "../../types.js"; import type { ShaderProcessingContext } from "./shaderProcessingOptions.js"; /** @internal */ export interface IShaderProcessor { shaderLanguage: ShaderLanguage; uniformRegexp?: RegExp; uniformBufferRegexp?: RegExp; textureRegexp?: RegExp; noPrecision?: boolean; parseGLES3?: boolean; attributeKeywordName?: string; varyingVertexKeywordName?: string; varyingFragmentKeywordName?: string; preProcessShaderCode?: (code: string, isFragment: boolean) => string; attributeProcessor?: (attribute: string, preProcessors: { [key: string]: string; }, processingContext: Nullable<ShaderProcessingContext>) => string; varyingCheck?: (varying: string, isFragment: boolean) => boolean; varyingProcessor?: (varying: string, isFragment: boolean, preProcessors: { [key: string]: string; }, processingContext: Nullable<ShaderProcessingContext>) => string; uniformProcessor?: (uniform: string, isFragment: boolean, preProcessors: { [key: string]: string; }, processingContext: Nullable<ShaderProcessingContext>) => string; uniformBufferProcessor?: (uniformBuffer: string, isFragment: boolean, processingContext: Nullable<ShaderProcessingContext>) => string; textureProcessor?: (texture: string, isFragment: boolean, preProcessors: { [key: string]: string; }, processingContext: Nullable<ShaderProcessingContext>) => string; endOfUniformBufferProcessor?: (closingBracketLine: string, isFragment: boolean, processingContext: Nullable<ShaderProcessingContext>) => string; lineProcessor?: (line: string, isFragment: boolean, processingContext: Nullable<ShaderProcessingContext>) => string; preProcessor?: (code: string, defines: string[], preProcessors: { [key: string]: string; }, isFragment: boolean, processingContext: Nullable<ShaderProcessingContext>) => string; postProcessor?: (code: string, defines: string[], isFragment: boolean, processingContext: Nullable<ShaderProcessingContext>, parameters: { [key: string]: number | string | boolean | undefined; }, preProcessors: { [key: string]: string; }, preProcessorsFromCode: { [key: string]: string; }) => string; initializeShaders?: (processingContext: Nullable<ShaderProcessingContext>) => void; finalizeShaders?: (vertexCode: string, fragmentCode: string, processingContext: Nullable<ShaderProcessingContext>) => { vertexCode: string; fragmentCode: string; }; }