Skip to content

Documentation / scene / encodeRGBM

Function: encodeRGBM() ​

encodeRGBM(scope, rgb, maxRange): PBShaderExp

Defined in: libs/scene/src/shaders/misc.ts:215

Encodes a color value into RGBM format

Parameters ​

scope ​

PBInsideFunctionScope

Current shader scope

rgb ​

PBShaderExp

The color value to be encoded

maxRange ​

number | PBShaderExp

The max range of color components

Returns ​

PBShaderExp

The encoded RGBA value

Released under the MIT License.