very slightly increase brightness of gradients

This commit is contained in:
2021-11-15 18:42:01 +01:00
parent 381b681115
commit 90a1c21b22

View File

@@ -34,14 +34,14 @@ export fn tic(time: i32) {
start fn gen_palette() {
let i: i32;
loop gradients {
let lazy scale = ((i := i + 1) % 64) as f32 / 64 as f32;
let inline angle = i as f32 * (3.1416 / 2.0 - 3.1416 / (11.0 * 16.0 * 2.0));
let lazy scale = (i % 64) as f32 / 64 as f32;
let lazy a = scale * max(0.07, sin(angle) * 0.8 * (i < 11*16*4) as f32 + 0.5);
let lazy a = max(0.07, sin(angle) * 0.8 * (i < 11*16*4) as f32 + 0.5) * scale;
let lazy b = scale * scale * 0.6;
let inline v = (min(a + b - a * b, 1 as f32) * 255 as f32) as i32;
i?(120+320*240) = v;
branch_if (i := i + 1) < 12*16*4: gradients;
branch_if i < 12*16*4: gradients;
}
i = 255;