17 lines
No EOL
626 B
GLSL
17 lines
No EOL
626 B
GLSL
/*
|
|
contributors: Inigo Quiles
|
|
description: quintic polynomial https://iquilezles.org/articles/smoothsteps/
|
|
use: <float|vec2|vec3|vec4> quintic(<float|vec2|vec3|vec4> value);
|
|
examples:
|
|
- https://raw.githubusercontent.com/patriciogonzalezvivo/lygia_examples/main/math_functions.frag
|
|
*/
|
|
|
|
#ifndef FNC_QUINTIC
|
|
#define FNC_QUINTIC
|
|
|
|
float quintic(const in float v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
|
|
vec2 quintic(const in vec2 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
|
|
vec3 quintic(const in vec3 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
|
|
vec4 quintic(const in vec4 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
|
|
|
|
#endif |