lygia
/v1.1.6
/math
/quintic
)quintic polynomial https://iquilezles.org/articles/smoothsteps/
Use:
<float|vec2|vec3|vec4> quintic(<float|vec2|vec3|vec4> value);
#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
Use:
<float|float2|float3|float4> quintic(<float|float2|float3|float4> value);
#ifndef FNC_QUINTIC
#define FNC_QUINTIC
float quintic(const in float v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
float2 quintic(const in float2 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
float3 quintic(const in float3 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
float4 quintic(const in float4 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); }
#endif
Dependencies:
lygia
/v1.1.6
/math
/operations
.glsl
Use:
<float|float2|float3|float4> quintic(<float|float2|float3|float4> value);
#ifndef FNC_QUINTIC
#define FNC_QUINTIC
inline __host__ __device__ float quintic(float v) { return v*v*v*(v*(v*6.0f-15.0f)+10.0f); }
inline __host__ __device__ float2 quintic(const float2& v) { return v*v*v*(v*(v*6.0f-15.0f)+10.0f); }
inline __host__ __device__ float3 quintic(const float3& v) { return v*v*v*(v*(v*6.0f-15.0f)+10.0f); }
inline __host__ __device__ float4 quintic(const float4& v) { return v*v*v*(v*(v*6.0f-15.0f)+10.0f); }
#endif
LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.
Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).
It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.
Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository