UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

71 lines (70 loc) 2.12 kB
/** * The standard material options define a set of options used to control the shader frontend shader * generation, such as textures, tints and multipliers. * * @category Graphics */ export class StandardMaterialOptions { /** * The set of defines used to generate the shader. * * @type {Map<string, string>} */ defines: Map<string, string>; /** * If UV1 (second set of texture coordinates) is required in the shader. Will be declared as * "vUv1" and passed to the fragment shader. */ forceUv1: boolean; /** * Defines if {@link StandardMaterial#specular} constant should affect specular color. */ specularTint: boolean; /** * Defines if {@link StandardMaterial#metalness} constant should affect metalness value. */ metalnessTint: boolean; /** * Defines if {@link StandardMaterial#gloss} constant should affect glossiness value. */ glossTint: boolean; emissiveEncoding: string; lightMapEncoding: string; vertexColorGamma: boolean; /** * If normal map contains X in RGB, Y in Alpha, and Z must be reconstructed. */ packedNormal: boolean; /** * If normal detail map contains X in RGB, Y in Alpha, and Z must be reconstructed. */ normalDetailPackedNormal: boolean; /** * If normal clear coat map contains X in RGB, Y in Alpha, and Z must be reconstructed. */ clearCoatPackedNormal: boolean; /** * Invert the gloss channel. */ glossInvert: boolean; /** * Invert the sheen gloss channel. */ sheenGlossInvert: boolean; /** * Invert the clearcoat gloss channel. */ clearCoatGlossInvert: boolean; /** * True to include AO variables even if AO is not used, which allows SSAO to be used in the lit shader. */ useAO: boolean; /** * Storage for the options for lit the shader and material. * * @type {LitShaderOptions} */ litOptions: LitShaderOptions; get pass(): number; } import { LitShaderOptions } from '../shader-lib/programs/lit-shader-options.js';