Skip to content

Latest commit

 

History

History

baker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Baker

Off-Screen Rendering, to generate Spherical harmonics and IBL mipmaps

npm

The Baker is published on npm with full typing support. To install, use:

$ npm install @galacean/tools-baker

This will allow you to import package entirely using:

import * as BAKER from "@galacean/tools-baker";

or individual classes using:

import { IBLBaker } from "@galacean/tools-baker";

Usage

const bakedTexture = IBLBaker.fromScene(scene);
ambientLight.specularTexture = bakedTexture;

const sh = new SphericalHarmonics3();
SphericalHarmonics3Baker.fromTextureCubeMap(bakedTexture, sh);
ambientLight.diffuseMode = DiffuseMode.SphericalHarmonics;
ambientLight.diffuseSphericalHarmonics = sh;

Links

License

The engine is released under the MIT license. See LICENSE file.