Nodes > Main > UnPack
Unpacks one or more floating point values from a single vector of 8 bit values. This is meant to be used alongside a Pack node with matching settings, which can prepare these packed vectors.
This node is useful for passing high precision values from one material to another through a render target. For example, one material could calculate precise height values every frame, and use a Pack node to pack each height as a 32 bit value that gets rendered out as an RGBA pixel. A second material could read this output in through a Render Target texture, and use the Unpack node to convert from RGBA back to floating point.
Note that packing values can cause a slight loss in precision, depending on the input value and Mode being used.
Inputs
Name | Type | Description |
---|---|---|
Value ( Packed ) | float | Value to unpack |
Min | float | Lower bound for first output value |
Max | float | Upper bound for first output value |
Min 2 | float | Lower bound for second output value |
Max 2 | float | Upper bound for second output value |
Outputs
Name | Type | Description |
---|---|---|
Value | float | Unpacked value |
Value 2 | float | Second unpacked value |
Properties
Name | Type | Description |
---|---|---|
Mode | dropdown | Controls how many values will be unpacked, and how many bits will be used for each value. This should match up with the Mode setting on the Pack node that packed the data. |
Quantize | bool | Forces 8 bit quantization on incoming packed values, necessary for maintaining high accuracy on some mobile GPU's. Leave this on in most cases, especially when precision is critical and texture filtering is set to Nearest. Turn off if artifacts appear when using Bilinear filtering. |
Remap Range | string | This uneditable field shows the decimal precision of the packing algorithm, useful to know for special cases such as integrating packed values with script. |
Was this page helpful?