@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
61 lines (60 loc) • 2.41 kB
TypeScript
export class LitShader {
constructor(device: any, options: any);
/**
* @param {import('../../../platform/graphics/graphics-device.js').GraphicsDevice} device - The
* graphics device.
* @param {import('./lit-shader-options.js').LitShaderOptions} options - The
* lit options.
* @ignore
*/
device: any;
options: any;
attributes: {
vertex_position: string;
};
chunks: any;
shaderPassInfo: import("../../shader-pass.js").ShaderPassInfo;
shadowPass: any;
lighting: any;
reflections: boolean;
needsNormal: boolean;
needsSceneColor: any;
needsScreenSize: any;
needsTransforms: any;
varyings: string;
varyingDefines: string;
vshader: string;
frontendDecl: string;
frontendCode: string;
frontendFunc: string;
lightingUv: string;
defines: any[];
fshader: string;
_vsAddBaseCode(code: any, chunks: any, options: any): any;
_vsAddTransformCode(code: any, device: any, chunks: any, options: any): any;
_setMapTransform(codes: any, name: any, id: any, uv: any): any;
_fsGetBaseCode(): any;
_fsGetStartCode(code: any, device: any, chunks: any, options: any): any;
_getLightSourceShapeString(shape: any): "" | "Rect" | "Disk" | "Sphere";
generateVertexShader(useUv: any, useUnmodifiedUv: any, mapTransforms: any): void;
_fsGetBeginCode(): string;
_fsGetPickPassCode(): string;
_fsGetDepthPassCode(): string;
_fsGetPrePassVelocityCode(): string;
_fsGetShadowPassCode(): string;
_fsGetLitPassCode(): string;
/**
* Generates a fragment shader. Please make sure to update src/deprecated/deprecated.js in
* case `this.fshader` does not longer contain the entire fragment shader once this function
* is done because we handle backwards compatibility there for old shaders. This allows us
* to have deprecation-free tree shaking while still fixing shaders for full builds.
*
* @param {string} frontendDecl - Frontend declarations like `float dAlpha;`
* @param {string} frontendCode - Frontend code containing `getOpacity()` etc.
* @param {string} frontendFunc - E.g. `evaluateFrontend();`
* @param {string} lightingUv - E.g. `vUv0`
* @ignore
*/
generateFragmentShader(frontendDecl: string, frontendCode: string, frontendFunc: string, lightingUv: string): void;
getDefinition(): any;
}