Skip to content

Documentation / scene / encode2HalfToRGBA

Function: encode2HalfToRGBA()

encode2HalfToRGBA(scope, a, b): PBShaderExp

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

Encodes two half floats into a rgba8unorm

Parameters

scope

PBInsideFunctionScope

Current shader scope

a

number | PBShaderExp

The first half float to be encode

b

number | PBShaderExp

The second half float to be encode

Returns

PBShaderExp

The encoded rgba8unorm

Released under the MIT License.