lygia
/v1.1.6
/math
/quartic
)quartic polynomial https://iquilezles.org/articles/smoothsteps/
Use:
<float|vec2|vec3|vec4> quartic(<float|vec2|vec3|vec4> value);
#ifndef FNC_QUARTIC
#define FNC_QUARTIC
float quartic(const in float v) { return v*v*(2.0-v*v); }
vec2 quartic(const in vec2 v) { return v*v*(2.0-v*v); }
vec3 quartic(const in vec3 v) { return v*v*(2.0-v*v); }
vec4 quartic(const in vec4 v) { return v*v*(2.0-v*v); }
#endif
Use:
<float|float2|float3|float4> quartic(<float|float2|float3|float4> value);
#ifndef FNC_QUARTIC
#define FNC_QUARTIC
float quartic(const in float v) { return v*v*(2.0-v*v); }
float2 quartic(const in float2 v) { return v*v*(2.0-v*v); }
float3 quartic(const in float3 v) { return v*v*(2.0-v*v); }
float4 quartic(const in float4 v) { return v*v*(2.0-v*v); }
#endif
Dependencies:
lygia
/v1.1.6
/math
/operations
.glsl
Use:
<float|float2|float3|float4> quartic(<float|float2|float3|float4> value);
#ifndef FNC_QUARTIC
#define FNC_QUARTIC
inline __host__ __device__ float quartic(float v) { return v*v*(2.0f-v*v); }
inline __host__ __device__ float2 quartic(const float2& v) { return v*v*(2.0f-v*v); }
inline __host__ __device__ float3 quartic(const float3& v) { return v*v*(2.0f-v*v); }
inline __host__ __device__ float4 quartic(const float4& v) { return v*v*(2.0f-v*v); }
#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