Jump to content

Transparent shape behind transparent sprite issue


Seba
 Share

Recommended Posts

Hello guys,

I have troubles with showing shapes that have an opacity < 1 and which are behind a sprite that also has an opacity < 1.

I attach a screenshot and here the playground

As you can see the shapes behind the sprite disappear

I tried differents options with material's shape such as :

  • forceDepthWrite
  • needDepthPrePass
  • separateCullingPass
  • zOffset

But nothing works, and on the Sprite side we don't have a lot of parameters to play with. I wonder if it's not due to a kind of optimization of babylon to not drop down the render.

 

sc_1.jpg

Link to comment
Share on other sites

Ok I found how to fix it by using renderingGroupId parameter from the meshes and the sprite manager.

set 0 to meshes and 1 to sprite manager.

But it's not perfect, if we set the camera position under the plane (grass) we have the sprite drawn before the plane.

Link to comment
Share on other sites

Hi Deltakosh,

Thanks for your reply.

Do you mean something like using a mesh instead of a sprite like a plane, then set my texture to this plane and set plane.billboardMode to  BILLBOARDMODE_ALL?

I have a lot of sprites. My project is a Map in 3D of a building let's say a shopping center and each shop is represented by a mesh in 3D and floating above a sprite which is the shop's logo.

I'm affraid that using meshes instead of sprites will drop down the rendering.

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...