Jump to content

Occlusion Queries bug


alexoy
 Share

Recommended Posts

Hi,

Probably there is a bug in occlusion queries - http://www.babylonjs-playground.com/#QDAZ80#15

Here a label is a thing that appears/disappears depending on the visibility of a sphere. I've noticed Occlusion Query takes into account only meshes that were created before it was enabled. If I add a box later - BJS doesn't understand that a sphere is behind the new box and my label stays visible.

In my demo - in the beginning the label is not visible because the sphere is not visible, it's good. However, if you go to the right behind the box - label will always be visible.

 

Is it normal and can be configured somehow or it's a bug?

Link to comment
Share on other sites

@Deltakosh, thanks, it helped :) and 2 new questions..

1. Of course about performance differences - will there be? Static list of meshes vs dynamic. Will it be reordered on every frame? (noticeable with a big enough list?);

2. For modelling I use Blender. When I set a texture on a mesh - there is a texture's setting whether to use "Alpha" or not. If I set "Use", even if my image is not transparent at all - occlusion queries say the label is still visible. If I uncheck "Use" - everything is fine and the label becomes invisible when behind this mesh. Is this an expected behavior?

Link to comment
Share on other sites

1. It will on every frame but sort are pretty fast now on browsers

2. Yes as you are no more creating an opaque mesh but a transparent one which will not be processed by occlusion queries

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...