API Reference

Class List

pc.Lightmapper

The lightmapper is used to bake scene lights into textures.

Summary

Methods

bake

Generates and applies the lightmaps.

Details

Constructor

Lightmapper(device, root, scene, renderer, assets)

Parameters

devicepc.GraphicsDevice

The grahpics device used by the lightmapper.

rootpc.Entity

The root entity of the scene.

scenepc.Scene

The scene to lightmap.

rendererpc.ForwardRenderer

The renderer.

assetspc.AssetRegistry

Registry of assets to lightmap.

Methods

bake(nodes, [mode])

Generates and applies the lightmaps.

Parameters

nodespc.Entity[]

An array of entities (with model components) to render lightmaps for. If not supplied, the entire scene will be baked.

modenumber

Baking mode. Can be:

Only lights with bakeDir=true will be used for generating the dominant light direction.