packUnorm4x8

Description

Convert a 4-component vector of normalized unsigned single/half-precision floating-point values to four 8-bit integer values, then pack these 8-bit values into a 32-bit unsigned integer.

Signature

uint packUnorm4x8(vector<float, 4> unpackedValue);

uint packUnorm4x8(vector<half, 4> unpackedValue);

Parameters

unpackedValue : vector<float, 4>

unpackedValue : vector<half, 4>

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

glsl

Available in all stages.

cpp

Available in all stages.

cuda

Available in all stages.

metal

Available in all stages.

wgsl

Available in all stages.

spirv

Available in all stages.