Jump to content

Decals materials are funky!


Recommended Posts

Hello everyone,

I'm trying to use decals with a PBRMaterial but can't get past a (apparently normal-related) glitch.

Playground example: http://www.babylonjs-playground.com/#1YDIEU
Click on the cylinder to add a few decals on different sides of the object. Each side behaves differently, as if the normals were the same for all of them.

I tried changing the PickingInfo.getNormal(bool, bool) call unsuccessfully, and even tried to force normals to be recalculated by using Mesh.updateMeshPositions(fn, true), but that didn't help. Granted, it might not even have anything to do with normals.. That's just a guess, supported by the fact that when using a NormalMaterial, decals are plain black.

Now, this may well be my fault and not really a bug, but in that case I'd argue the examples and documentation have a bug! :D

I appreciate any help. Also, feel free to curse me in case I'm doing something stupid.

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.

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.


  • Recently Browsing   0 members

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