Gamma Adjust
The gamma knob every material pipeline is missing
- image
- image
You know the drill: a texture comes out of an extractor looking too dark in the shadows or too washed in the highlights, and adding brightness makes the whole thing muddy. That's because it's not a brightness problem - it's a curve problem. Gamma correction raises every pixel value to a power, which reshapes the midtones while keeping black and white pinned in place. It's the surgical version of brightness, and it's the adjustment this node exists to make.
The math is one line: out = in^gamma. Below 1.0 brightens (it lifts midtones toward white), above 1.0 darkens (it sinks them toward black), and 1.0 is a no-op. Because black stays black and white stays white, you don't blow out your highlights to fix a dark midtone the way you would with a brightness slider. For material work that's huge - your AO, height, and roughness maps are defined by their value relationships, and gamma preserves the endpoints while reshaping everything between.
The per_channel toggle is where it goes from handy to indispensable. With it on, you get independent gamma_red, gamma_green, and gamma_blue controls. The classic use is color correction: an albedo with a green cast, or a texture where one channel is slightly off after an extraction, can be rebalanced by nudging a single channel's gamma. The tooltip on the main gamma field says it best: < 1.0 = brighten, > 1.0 = darken, 1.0 = no change.
Two input details worth knowing. If gamma is 1.0 and per-channel is off, the node returns the image untouched - no wasted processing. And per-channel gamma only kicks in on images with 3+ channels; it falls back gracefully on grayscale. Output is the adjusted image.
Where this sits in the pack: the PBR extractor's docs are full of gamma advice (gamma_metal_rough in the 1.2–1.6 range to fix washed-out maps), and this node is how you apply that advice after extraction, or to any map in your graph. It's the natural companion to the pack's PBR Pipeline Adjuster, but it's also just a clean standalone curve tool. If you keep exactly one adjustment node on your material canvas, this is a strong candidate - it does one thing, does it well, and never surprises you.
Install: Manager → search "Texture Alchemy", or:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart, then Texture Alchemist/Adjustment → Gamma Adjust. No dependencies, no model files. Shared pack gotchas: the README's manual-copy step references the pre-rebrand folder name, and if Manager blocks a Git-URL install, that's ComfyUI's security level - clone by hand rather than lowering it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| gamma | FLOAT | 1.000.1–5 | Gamma value (< 1.0 = brighten, > 1.0 = darken, 1.0 = no change) |
| per_channel | BOOLEAN | false | Apply gamma to each channel independently (useful for color correction) |
| gamma_redopt | FLOAT | 1.000.1–5 | Gamma for red channel (only used if per_channel is enabled) |
| gamma_greenopt | FLOAT | 1.000.1–5 | Gamma for green channel (only used if per_channel is enabled) |
| gamma_blueopt | FLOAT | 1.000.1–5 | Gamma for blue channel (only used if per_channel is enabled) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |