Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_material_clamp.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b196aed690ff7c9e0b5bd46b1aa71caafd3d1b1a (plain)
1
2
3
4
5
6
7
8
9
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);
}