Baltor Get started

Gallery / Godot shaders

Hue, saturation, value and sepia adjustment

In your harnessGodot shaderMIT

Adjust a sprite's colours in HSV space (hue rotation, saturation, value), then optionally fade it toward greyscale or sepia, with contrast control, for variants, status effects and old-photo looks.

Render of Hue, saturation, value and sepia adjustment
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Shader type
canvas_item
Parameters
hue_shift_degrees (float = 0), saturation (float = 1), value (float = 1), contrast (float = 1), grayscale (float = 0), sepia (float = 0)
Use it on
A Sprite2D (or other textured CanvasItem) with transparent space around its shape, assigned to the node as usual.
Result
The orange sprite rotated to cool blue and green hues with a little more saturation.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/sprite_hsv_adjust/

Limits. Hue rotation in HSV is not perceptually uniform, so some hues change brightness as they rotate. Greys have no hue to rotate.

Details

Kind
Godot shader
Engine
Godot 4.3 or later
Files
11 files, 68.7 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, opengl3 compatibility (Mesa llvmpipe, Xvfb)
Checks
contract static, engine run, engine log clean, shader in scene, capture written, render not uniform, shader changes pixels
Techniques
RGB to HSV hexcone conversion and back, Luminance-based greyscale and sepia toning
Tags
godot shader, canvas item, hsv, hue shift, sepia, grayscale, color adjustment
Identity
library.supply.creative_originals.3821228099271fae2186bc11.30e615db8161d2e2
Version
30e615db8161d2e2387b9248145cc98ff03227cac8eed237c47a73c5a3e245c5

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.