2.5. Color mapping

Module color_mapping

2.5.1. Tone mapping

tone_aces_fit(value: float3 ): float3

Apply the Narkowicz ACES approximation, clamping negative input to zero. This is not a full ACES transform.

Arguments:
  • value : float3

tone_pbr_neutral(value: float3 ): float3

Apply Khronos PBR Neutral to nonnegative RGB, compressing and desaturating highlights together.

Arguments:
  • value : float3

tone_reinhard(value: float3 ): float3

Compress RGB channels independently with the Reinhard curve; negative input is clamped to zero.

Arguments:
  • value : float3

2.5.2. sRGB transfer functions

color_srgb_decode(value: float3 ): float3

Decode nonnegative sRGB channels independently to linear RGB; values above one remain above one.

Arguments:
  • value : float3

color_srgb_decode_channel(value: float ): float

Decode one sRGB channel to linear light, clamping negative input to zero.

Arguments:
  • value : float

color_srgb_encode(value: float3 ): float3

Encode nonnegative linear RGB with the sRGB transfer function; values above one remain above one.

Arguments:
  • value : float3

color_srgb_encode_channel(value: float ): float

Encode one linear channel with the sRGB transfer function, clamping negative input to zero.

Arguments:
  • value : float