From f350b67a66329419ccc35dc349e78c32f8cc22b9 Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 24 Dec 2023 12:06:11 -0800 Subject: [PATCH] Comments --- src/render/shaders/starfield.wgsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/shaders/starfield.wgsl b/src/render/shaders/starfield.wgsl index 9f8fb4a..d582d43 100644 --- a/src/render/shaders/starfield.wgsl +++ b/src/render/shaders/starfield.wgsl @@ -64,12 +64,13 @@ fn vertex_shader_main( // TODO: configurable. // Uniform distribution! if (real_size.x < 0.5 || real_size.y < 0.5) { + // If this star is too small, don't even show it out.position = vec4(2.0, 2.0, 0.0, 1.0); return out; } if (real_size.x < 2.0 || real_size.y < 2.0) { + // Otherwise, clamp to a minimum scale scale = 2.0 / max(global.window_size.x, global.window_size.y); - }