Capítulo 143 de 859

Chapter 143: RectAreaLightTexturesLib

Core Idea

Texture library for RectAreaLight. This class holds the LTC BRDF data in data textures for further use in the renderer.

Reference: Real-Time Polygonal-Light Shading with Linearly Transformed Cosines by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt. Code.

NOTE: This is a temporary location for the BRDF approximation texture data based off of Eric Heitz's work (see citation). BRDF data for RectAreaLight is currently approximated using a precomputed texture of roughly 80kb in size. The hope is to find a better way to include the large texture data before including the full RectAreaLight implementation in the main build files.

Key Concepts

  • LTC_FLOAT_1 : DataTexture: The first LTC FP32 data texture.
  • LTC_FLOAT_2 : DataTexture: The second LTC FP32 data texture.
  • LTC_HALF_1 : DataTexture: The first LTC FP16 data texture.
  • LTC_HALF_2 : DataTexture: The second LTC FP16 data texture.

Code Examples

import { RectAreaLightTexturesLib } from 'three/addons/lights/RectAreaLightTexturesLib.js';
  • What it demonstrates: Typical usage of RectAreaLightTexturesLib.

Reference Tables

Properties

PropertyDescription
.LTC_FLOAT_1 : DataTextureThe first LTC FP32 data texture.
.LTC_FLOAT_2 : DataTextureThe second LTC FP32 data texture.
.LTC_HALF_1 : DataTextureThe first LTC FP16 data texture.
.LTC_HALF_2 : DataTextureThe second LTC FP16 data texture.

Key Takeaways

  1. Most relevant properties: LTC_FLOAT_1, LTC_FLOAT_2, LTC_HALF_1, LTC_HALF_2.

Connects To