Skip to content

Instantly share code, notes, and snippets.

@ioxu
ioxu / godot_shader_utility_functions.shader
Last active December 7, 2021 17:01
stash of some Godot Engine shader functions
float gamma(float i, float g) {
return pow(i, 1.0/g);
}
float map(float value, float inMin, float inMax, float outMin, float outMax) {
return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin);
}