master
Mark 2023-12-24 12:06:11 -08:00
parent 6f01e7d3bd
commit f350b67a66
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 2 additions and 1 deletions

View File

@ -64,12 +64,13 @@ fn vertex_shader_main(
// TODO: configurable. // TODO: configurable.
// Uniform distribution! // Uniform distribution!
if (real_size.x < 0.5 || real_size.y < 0.5) { 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<f32>(2.0, 2.0, 0.0, 1.0); out.position = vec4<f32>(2.0, 2.0, 0.0, 1.0);
return out; return out;
} }
if (real_size.x < 2.0 || real_size.y < 2.0) { 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); scale = 2.0 / max(global.window_size.x, global.window_size.y);
} }