From 727b1c2ee98d395429ec1e667279fc3f5fec3a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Sun, 17 Jan 2021 17:51:07 -0300 Subject: Fix fragment shader bug on empty curves --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 242a1ef..9f9ad9f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,8 +26,8 @@ fn shader_from_source(source: &CStr, shader_type: GLenum) -> GLuint { } fn main() { - let a = lerp::lp(Lerp::new(vec![100.0, 200.0, 800.0, 400.0, 800.0, 100.0])); - let b = lerp::lp(Lerp::new(vec![100.0, 550.0, 500.0, 300.0, 200.0, 800.0])); + let a = lerp::lp(Lerp::new(vec![200.0, 500.0, 500.0])); + let b = lerp::lp(Lerp::new(vec![200.0, 500.0, 200.0])); let sdl_context = sdl2::init().unwrap(); let video_subsystem = sdl_context.video().unwrap(); @@ -110,7 +110,7 @@ float inside(vec2 pos) {{ }} t = step; }} - return 1 - pow(closest / thr, 2); + return 1 - closest / thr; }} void main() {{ -- cgit v1.2.3