Roomy Posted March 15, 2021 Share Posted March 15, 2021 (edited) Hey, so, I have a relatively simple problem: I want to cut the solid parts of a lightmap out of a darkness layer, usually one solid color. This can't be done without alpha compositing unless you use custom filters, so I decided to give it a crack. I got a version working in 3.0.0 PIXI (based off of an old lightmap filter), but when transitioning to 5.2.2, I'm experiencing all kinds of problems, namely that the lightmap, despite logging/extracting/etc. as the expected picture, seems to be treated as pure white by the filter. You can find my demonstration here: https://codepen.io/roomyrooms/pen/mdOQggP?editors=0010 As you can see, setting the alpha of the darkness layer to the lightmap's alpha per-frag makes it invisible, completely. It doesn't seem to be interpreting the lightmap at all. Any help? Apologies, I'm a newbie to shaders/webgl/pixi/everything! For those curious, here's a working version in 3.0.8: https://codepen.io/roomyrooms/pen/NWbmKLj?editors=0010 Edited March 15, 2021 by Roomy ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
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.