mirror of
https://github.com/exoticorn/curlywas.git
synced 2026-01-20 11:46:43 +01:00
small tweak to prevent 100% saturation
This commit is contained in:
@@ -35,7 +35,7 @@ fn make_gradient(c: f32, base: i32) -> i32 {
|
|||||||
let i: i32;
|
let i: i32;
|
||||||
loop colors {
|
loop colors {
|
||||||
let lazy f = (i + 4) as f32 / 64 as f32;
|
let lazy f = (i + 4) as f32 / 64 as f32;
|
||||||
let lazy a = f * max(0 as f32, c + 0.5);
|
let lazy a = f * max(0.07, c + 0.5);
|
||||||
let lazy b = f * f * 0.6;
|
let lazy b = f * f * 0.6;
|
||||||
let lazy v = ((a + b - a * b) * 255 as f32) as i32;
|
let lazy v = ((a + b - a * b) * 255 as f32) as i32;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user