Issue with aliasing on non-Android, non-iPhone device

  • Hi all, I have a device that is neither Android nor iPhone. On this device, when using krpano to display panoramic images—whether in a WebView or a browser—there is a serious aliasing (jagged edge) issue. However, when I set the WebView’s user agent to "Android", the aliasing disappears and the panorama becomes very sharp and clear.

    Unfortunately, I cannot change the user agent for the browser. My question is: Is there any way to eliminate aliasing by adjusting krpano parameters? If so, which parameters should I set?

    I have tried setting display.antialias=true and webglsettings.antialias=true, but neither seems to have any effect.

  • Hi,

    what device is this?

    But setting the webglsettings embedding should definitely work:

    krpano.com - Documentation - Embedding into HTML

    How do you set it?
    Correct would be in the embedpano call:

    Code
    embedpano({..., webglsettings:{antialias:true}});


    But even with disabled anti-aliasing, there should be no jagged edges in the pano images, the anti-aliasing mainly only effects hotspots edges... So maybe the actual problem is something else...

    Best regards,
    Klaus

  • Thank you for your reply. I did follow the documentation to add the WebGL settings, exactly as you wrote in your reply, but unfortunately, they still didn’t work.

    The device I’m developing on is a Huawei phone running the HarmonyOS system. The WebView’s user agent is:

    Mozilla/5.0 (Phone; OpenHarmony 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.

  • index.html

    test.xml

    Before appending the "android" string to the WebView's User Agent:

    After appending the "android" string to the WebView's User Agent

  • Hi,

    this is not anti-aliasing, this is wrong (too low) rendering resolution...

    In krpano there is a detection and workaround for very old Android devices that weren't handling HiDPI cases (devicePixelRatio > 1.0) correctly, and it seems your device is somehow getting into this case...

    Will check that further, I think that special case handling can be already removed...

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!