0

If i have A8R8G8B8 render target and assign float number to alpha in return of pixel shader, how in this case 32-bit float would be converted to fit 8-bit?

1 Answers1

1

The A8R8G8B8 format specifies a 4-channel color with 8 bits per channel. Direct3D automatically converts return values to the specified destination format, typically in the UNORM range for render targets. For 8 bits, UNORM encodes 256 evenly-spaced values between 0.0 and 1.0, inclusive. The default rounding behavior is round-nearest, ties-to-even.

MooseBoys
  • 6,641
  • 1
  • 19
  • 43