Jump to content

PIXI.js Tilemap doesn't render when using MULTIPLY mode in the lights sample


Morder
 Share

Recommended Posts

Trying to add the simple layer/lights to a scene with a tilemap and when the lightSprite is set to MULTIPLY mode the tilemap just disappears. ADD mode works but the coloring is terrible. The following link is a minimal sample that shows the failure.

https://jsfiddle.net/g1cm7xjb/

Could someone help me to understand where I'm going wrong? (I actually saw a post by someone else that showed exactly what I was trying to accomplish but alas no code there)

 

Thanks

Link to comment
Share on other sites

  • Morder changed the title to PIXI.js Tilemap doesn't render when using MULTIPLY mode in the lights sample

Thanks! That got me in the right direction. Tilemap does not support blendmode but adding `gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)` (BLEND_MODES.NORMAL) to the tilemap works like a charm.

I'll have to study how pixi implements `.blendMode` and see what I can do to make a PR.

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