mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-01-08 11:25:21 -08:00
update default thickness to match with previous lineWidth user were interested of
This commit is contained in:
committed by
Matthieu Baumann
parent
0c9c315f69
commit
d6583e47ef
@@ -17,7 +17,9 @@ void main() {
|
||||
color = u_color;
|
||||
|
||||
// distance from line to compute the anti-aliasing
|
||||
float dist = abs(u_thickness * l.y);
|
||||
color.a = color.a * (1.0 - smoothstep(u_thickness*0.5 - 1.0, u_thickness*0.5, dist));
|
||||
float dist = abs((u_thickness + 2.0) * l.y);
|
||||
|
||||
float half_thickness = (u_thickness + 2.0) * 0.5;
|
||||
color.a = color.a * (1.0 - smoothstep(half_thickness - 1.0, half_thickness, dist));
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ void main() {
|
||||
float ndc2pix = 2.0 / u_width;
|
||||
|
||||
vec2 p_ndc_x = x_b * vertex.x;
|
||||
vec2 p_ndc_y = u_thickness * y_b * vertex.y * vec2(1.0, u_width/u_height) * ndc2pix;
|
||||
vec2 p_ndc_y = (u_thickness + 2.0) * y_b * vertex.y * vec2(1.0, u_width/u_height) * ndc2pix;
|
||||
|
||||
vec2 p_ndc = p_a_ndc + p_ndc_x + p_ndc_y;
|
||||
gl_Position = vec4(p_ndc, 0.f, 1.f);
|
||||
|
||||
@@ -16,7 +16,7 @@ void main() {
|
||||
|
||||
float ndc2pix = 2.0 / u_width;
|
||||
|
||||
vec2 p = p_a + x_b * vertex.x + u_thickness * y_b * vertex.y * vec2(1.0, u_width/u_height) * ndc2pix;
|
||||
vec2 p = p_a + x_b * vertex.x + (u_thickness + 2.0) * y_b * vertex.y * vec2(1.0, u_width/u_height) * ndc2pix;
|
||||
gl_Position = vec4(p, 0.f, 1.f);
|
||||
l = vec2(0.0, vertex.y);
|
||||
}
|
||||
@@ -732,7 +732,7 @@ export let Aladin = (function () {
|
||||
reticleColor: "rgb(178, 50, 178)",
|
||||
reticleSize: 22,
|
||||
gridColor: "rgb(178, 50, 178)",
|
||||
gridOpacity: 0.4,
|
||||
gridOpacity: 0.8,
|
||||
gridOptions: {
|
||||
enabled: false,
|
||||
showLabels: true,
|
||||
|
||||
Reference in New Issue
Block a user