Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.11 KB

README.md

File metadata and controls

46 lines (31 loc) · 1.11 KB

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.