mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-25 12:25:52 -08:00
Catalog sources multiplied by inv_model instead of model
This commit is contained in:
@@ -513,11 +513,9 @@ impl Catalog {
|
||||
// Attach catalog specialized uniforms
|
||||
.attach_uniform("kernel_texture", &manager.kernel_texture) // Gaussian kernel texture
|
||||
.attach_uniform("strength", &self.strength) // Strengh of the kernel
|
||||
.attach_uniform("model", camera.get_m2w())
|
||||
.attach_uniform("current_time", &utils::get_current_time())
|
||||
.attach_uniform("kernel_size", &manager.kernel_size)
|
||||
.attach_uniform("max_density", &self.max_density)
|
||||
.attach_uniform("fov", &camera.get_aperture().0)
|
||||
.bind_vertex_array_object_ref(&self.vertex_array_object_catalog)
|
||||
.draw_elements_instanced_with_i32(
|
||||
WebGl2RenderingContext::TRIANGLES,
|
||||
|
||||
@@ -253,7 +253,7 @@ impl ProjetedGrid {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn draw_lines_GPU<P: Projection>(
|
||||
fn draw_lines_GPU<P: Projection>(
|
||||
&self,
|
||||
camera: &CameraViewPort,
|
||||
shaders: &mut ShaderManager,
|
||||
@@ -293,7 +293,7 @@ impl ProjetedGrid {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn draw_lines_CPU<P: Projection>(
|
||||
fn draw_lines_CPU<P: Projection>(
|
||||
&self,camera: &CameraViewPort,
|
||||
shaders: &mut ShaderManager,
|
||||
) -> Result<(), JsValue> {
|
||||
|
||||
@@ -8,6 +8,7 @@ layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -19,7 +20,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_aitoff(p);
|
||||
|
||||
@@ -7,7 +7,7 @@ layout (location = 2) in vec3 center;
|
||||
layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -19,7 +19,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_arc(p);
|
||||
|
||||
@@ -7,7 +7,7 @@ layout (location = 2) in vec3 center;
|
||||
layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -19,7 +19,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_mercator(p);
|
||||
|
||||
@@ -7,7 +7,7 @@ layout (location = 2) in vec3 center;
|
||||
layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -19,7 +19,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_mollweide(p);
|
||||
|
||||
@@ -8,7 +8,7 @@ layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -20,7 +20,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_orthographic(p);
|
||||
|
||||
@@ -8,7 +8,7 @@ layout (location = 3) in vec2 center_lonlat;
|
||||
|
||||
|
||||
uniform float current_time;
|
||||
uniform mat4 model;
|
||||
uniform mat4 inv_model;
|
||||
|
||||
uniform vec2 ndc_to_clip;
|
||||
uniform float czf;
|
||||
@@ -20,7 +20,7 @@ out vec3 out_p;
|
||||
@import ../hips/projection;
|
||||
|
||||
void main() {
|
||||
vec3 p = vec3(model * vec4(center, 1.0f));
|
||||
vec3 p = vec3(inv_model * vec4(center, 1.0f));
|
||||
p = check_inversed_longitude(p);
|
||||
|
||||
vec2 center_pos_clip_space = world2clip_gnomonic(p);
|
||||
|
||||
Reference in New Issue
Block a user