Levels
Remaps input and output brightness ranges with gamma correction, per-channel or on the master. Includes a live histogram display.
Category: Color Menu path: Color > Levels
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
in | imageRgba16f | input | Input image |
out | imageRgba16f | output | Adjusted result |
Parameters
The Levels node has a channel selector and 5 controls per channel (Master + Red + Green + Blue = 20 scalar params total).
| Param | Type | Default | Description |
|---|---|---|---|
channel | enum | Master | Which channel set to display in Properties. Options: Master, Red, Green, Blue. |
Master Channel
| Param | Type | Default | Description |
|---|---|---|---|
inBlack | scalar | 0.0 | Input black point. Values at or below this become output black. |
inWhite | scalar | 1.0 | Input white point. Values at or above this become output white. |
gamma | scalar | 1.0 | Midtone gamma. Values < 1 darken midtones, > 1 brighten them. |
outBlack | scalar | 0.0 | Output black point. Remapped minimum brightness. |
outWhite | scalar | 1.0 | Output white point. Remapped maximum brightness. |
Per-Channel (Red, Green, Blue)
Each channel has the same 5 controls, prefixed by the channel name:
| Param | Type | Default | Description |
|---|---|---|---|
redInBlack / greenInBlack / blueInBlack | scalar | 0.0 | Per-channel input black point |
redInWhite / greenInWhite / blueInWhite | scalar | 1.0 | Per-channel input white point |
redGamma / greenGamma / blueGamma | scalar | 1.0 | Per-channel midtone gamma |
redOutBlack / greenOutBlack / blueOutBlack | scalar | 0.0 | Per-channel output black point |
redOutWhite / greenOutWhite / blueOutWhite | scalar | 1.0 | Per-channel output white point |
All parameters are keyframeable.
How It Works
The GPU shader processes each pixel through two stages. First, the master levels remap the overall brightness: input values are clamped to [inBlack, inWhite], normalized to [0, 1], gamma-corrected, then scaled to [outBlack, outWhite]. Then per-channel levels apply the same process independently to R, G, and B.
The processing order is: unpremultiply alpha, apply master levels, apply per-channel levels, repremultiply alpha.
Histogram
The Properties panel shows a live histogram of the input image. The histogram is computed from a blitted-down version of the input texture and displays R, G, B, and Luminance distributions on a log scale. The histogram is cached and only recomputed when the input changes (not during playback, for performance).
Usage Examples
Basic: Increase contrast
- Add a Levels node after your image source
- Set
inBlackto 0.1 andinWhiteto 0.9 - This crushes the shadows and highlights, increasing overall contrast
Creative: Color tinting via per-channel levels
- Switch to the Red channel and raise
outBlackto 0.1 - This adds a red tint to the shadows
- Switch to Blue and lower
outWhiteto 0.8 for warm shadows with cool highlights
Advanced: Animated exposure correction
Keyframe gamma from 0.5 to 1.5 to animate a brightness shift over time. Unlike exposure (which is a linear multiply), gamma reshapes the midtones while preserving blacks and whites.
Tips
- Use the histogram to identify clipped highlights or crushed shadows before adjusting
- The
gammaslider is the most useful single control -- it adjusts brightness without affecting the extremes inBlack>inWhiteinverts the tonal range (negative effect)- Per-channel adjustments are applied after master, so they refine the overall adjustment
- All 20 params are keyframeable, enabling animated color grading
Related Nodes
- Curves -- more flexible per-channel tone control with arbitrary curves
- ColorCorrect -- CDL-style grading (exposure, saturation, temperature)
- Invert -- full channel inversion