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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl
index 9fe45f91f45..17240da4050 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl
@@ -13,6 +13,15 @@ void valtorgb_opti_linear(
outalpha = outcol.a;
}
+void valtorgb_opti_ease(
+ float fac, vec2 mulbias, vec4 color1, vec4 color2, out vec4 outcol, out float outalpha)
+{
+ fac = clamp(fac * mulbias.x + mulbias.y, 0.0, 1.0);
+ fac = fac * fac * (3.0 - 2.0 * fac);
+ outcol = mix(color1, color2, fac);
+ outalpha = outcol.a;
+}
+
void valtorgb(float fac, sampler1DArray colormap, float layer, out vec4 outcol, out float outalpha)
{
outcol = texture(colormap, vec2(fac, layer));