Jump to content

Roomy

Members
  • Content Count

    6
  • Joined

  • Last visited

  • Days Won

    1
  1. Hey Ivan, thanks for the tips & advice! I appreciate the links, especially #1 about the premultiplied colors. I genuinely had no idea this was a thing, so that's a huge help. I took a look at the other links, but I think I'm still a little bit lost on how to fix my issue. I'm currently using pixel coordinates as you said in the first jsfiddle link, but that results in them being misaligned due to the power of two rule with textures & filters. Is it possible to simultaneously check for distance based on pixels, while also factoring in the power of two thing with "vTexture
  2. Hey there! I know there are tons of posts about this stuff so I'll try to keep it short and simple. I'm trying to make a lighting filter where I pass a list of points (e.g. 0.5,0.5) to a filter and it "punches out" holes in a darkness layer, which has the filter. That part is all well and good. Unfortunately- If I want the lightmap holes to be circular, they end up misaligned. https://jsfiddle.net/roomyrooms/qfLa87t9/5/ ^ They are perfectly shaped and will stay the same size under any dimension, but 0,0 0.5,0.5 1,1<- these points are very clearly not in the right places. This is b
  3. I managed to get it working!!! https://jsfiddle.net/roomyrooms/z7n3fuqt/49/ It takes a lightmap, a tilemap (just the background) and a darkmap (a sheet of a single color) and renders the lightmap's black values as transparency in the darkmap, effectively punching holes in it just the way I wanted. Woohoo!
  4. For those curious, here's a working version in 3.0.8: https://codepen.io/roomyrooms/pen/NWbmKLj?editors=0010
  5. 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/roomy
  6. 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/roomy
×
×
  • Create New...