Skip to content

Documentation / scene / encodeFloatToRGBA

Function: encodeFloatToRGBA() ​

encodeFloatToRGBA(scope, value): PBShaderExp

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

Encodes a float into a rgba8unorm

Parameters ​

scope ​

PBInsideFunctionScope

Current shader scope

value ​

number | PBShaderExp

The float value to be encode

Returns ​

PBShaderExp

The encoded rgba8unorm

Released under the MIT License.