Function setPbrLightmap
-
setPbrLightmap(
material: PbrMaterialProps,
texture: Texture2D,
options?: PbrLightmapOptions,
): voidParameters
- material: PbrMaterialProps
Target PBR material.
- texture: Texture2D
The baked lightmap. Effective V orientation combines
texture.invertYwith the Babylon.jstexture.uAng === Math.PIconvention. Optionaloptions: PbrLightmapOptionsBlend/decode options.
Returns void
- material: PbrMaterialProps
Assign a baked lightmap to a PBR material. Requires enablePbrLightmap.
Prefer this over setting
material.lightmapTexturedirectly: forcoordIndex: 1it also records the material's TEXCOORD_1 claim, which is what drives the uv2 vertex attribute and varying.