fix a little bit the labels transparency + request blank from allsky

This commit is contained in:
bmatthieu3
2022-06-10 15:57:44 +02:00
parent b4baa600dd
commit 66636bee5a
4 changed files with 4 additions and 3 deletions

View File

@@ -106,7 +106,7 @@ impl PixelMetadata {
let format = cfg.get_format();
let ext = format.get_ext_file();
let url = format!("{}/Norder0/Dir0/Npix0.{}", hips_url, ext);
let url = format!("{}/Norder3/Allsky.{}", hips_url, ext);
PixelMetadata {
hips_url,

View File

@@ -370,7 +370,7 @@ impl RenderManager for TextRenderManager {
self.gl.enable(WebGl2RenderingContext::BLEND);
self.gl.blend_func_separate(
WebGl2RenderingContext::SRC_ALPHA,
WebGl2RenderingContext::ONE,
WebGl2RenderingContext::ONE_MINUS_SRC_ALPHA,
WebGl2RenderingContext::ONE,
WebGl2RenderingContext::ONE,
); // premultiplied alpha

View File

@@ -10,6 +10,7 @@ uniform sampler2D u_sampler_font;
void main() {
// The texture is set up with `SRGB8_ALPHA8`, so no need to decode here!
float alpha = texture(u_sampler_font, v_tc).r;
alpha = smoothstep(0.1, 0.9, alpha);
// Multiply vertex color with texture color (in linear space).
// Linear color is written and blended in Framebuffer and converted to sRGB later

View File

@@ -235,7 +235,7 @@ export let HpxImageSurvey = (function() {
// HiPS grayscale
this.colored = false;
if (metadata.dataproduct_subtype && metadata.dataproduct_subtype === "color") {
if (metadata.dataproduct_subtype && (metadata.dataproduct_subtype === "color" || metadata.dataproduct_subtype[0] === "color") ) {
this.colored = true;
}