fuckingtech/public/assets/glsl/lygia/math/cubic.wgsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

9 lines
No EOL
331 B
WebGPU Shading Language

/*
contributors: Inigo Quiles
description: cubic polynomial https://iquilezles.org/articles/smoothsteps/
*/
fn cubic(v: f32) -> f32 { return v*v*(3.0-2.0*v); }
fn cubic2(v: vec2f) -> vec2f { return v*v*(3.0-2.0*v); }
fn cubic3(v: vec3f) -> vec3f { return v*v*(3.0-2.0*v); }
fn cubic4(v: vec4f) -> vec4f { return v*v*(3.0-2.0*v); }