packSnorm2x16

Description

Convert a 2-component vector of normalized signed single/half-precision floating-point values to two 16-bit integer values, then pack these 16-bit values into a 32-bit unsigned integer.

Signature

uint packSnorm2x16(vector<float, 2> unpackedValue);

uint packSnorm2x16(vector<half, 2> unpackedValue);

Parameters

unpackedValue : vector<float, 2>

unpackedValue : vector<half, 2>

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.