Prevent sampling outside bv color map for stars

Should adress #2404
This commit is contained in:
Emma Broman
2024-05-17 10:51:02 +02:00
parent ce765c6f72
commit c3657921d2
+1
View File
@@ -61,6 +61,7 @@ const int ColorOptionFixedColor = 4;
vec4 bv2rgb(float bv) {
// BV is [-0.4,2.0]
float t = (bv + 0.4) / (2.0 + 0.4);
t = clamp(t, 0.0, 1.0);
return texture(colorTexture, t);
}