Embedding HTML5 pano with transparent background

  • It seems krpano has lost the ability to embed panos with a transparent background, at least in HTML5 mode. I used this feature for a project a couple years ago, using krpano version 1.16.7. Now I’d like to use the same feature for a new project, but it seems krpano 1.17 and 1.18 don’t support a transparent background anymore, unless you use Flash, which I’d prefer not to do.

    All I did to enable transparency krpano 1.16 was use transparent PNG files for the pano images, and set wmode="transparent" in the embedpano options. That’s all I could find when I searched for this issue in the docs, these forums and on google. Is this a bug then, or is there some other option I need to set?

  • Hi,

    the reason therefore is WebGL - wmode=transparent is currently not supported when using WebGL (WebGL support was introduced with version 1.17).

    You could use html5=prefer+css3d to use CSS3D instead of WebGL, then wmode=transparent should work like in version 1.16.

    I'm already working on bringing wmode=transparent support also to WebGL, but that's a bit more complicated - it's difficult to pass and manage the right alpha value through all shaders and framebuffers... And that case needs special implementations to avoid performance slow downs for the other cases where that pass-through transparency is not required.

    Best regards,
    Klaus

  • Hi Klaus, thanks for explaining this. Perhaps it would be a good idea to note this info in the documentation for wmode?

    I do appreciate the difficulty in implementing new features without compromising performance. Krpano’s outstanding speed is a big reason why we use it. Keep building a great product! *thumbup*

Participate now!

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