This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/material/gpu_shader_material_clamp.glsl

10 lines
258 B
GLSL
Raw Normal View History

void clamp_value(float value, float min, float max, out float result)
{
result = clamp(value, min, max);
}
void clamp_range(float value, float min, float max, out float result)
{
result = (max > min) ? clamp(value, min, max) : clamp(value, max, min);
}