ivan.popelyshev

Members
  • Content Count

    3832
  • Joined

  • Last visited

  • Days Won

    124

ivan.popelyshev last won the day on January 22

ivan.popelyshev had the most liked content!

About ivan.popelyshev

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    https://gameofbombs.com/
  • Twitter
    ivanpopelyshev

Profile Information

  • Gender
    Male
  • Location
    Moscow, Russia
  • Interests
    Pixi.js, Topcoder, Codeforces, ninjas and bombers

Recent Profile Visitors

15785 profile views
  1. The fix was made in december and will appear in 5.2.1: https://github.com/pixijs/pixi.js/pull/6270 Two ways how to get it: Use "pixijs.download/master/pixi.js" (map file and typings are in the same folder) Look in the example https://www.pixiplayground.com/#/edit/kuhrhc4jG5QnRRtIfwGwk and copy the bottom part to your app (blurFilterPassApply and the hack) Welcome to the forums!
  2. OK, done, npm 2.0.5 , or "dist" folder of the repo.
  3. Congratulations, you've found a bug! https://github.com/pixijs/pixi-compressed-textures/blob/6fa56acaa6a98863f3f00bdf2ed2be16f864f42d/src/CompressedImage.ts#L125 - compressed textures didnt handle CLAMP/REPEAT at all
  4. > Unfortunately both the global setting of WRAP_MODE and the setting of WRAP_MODE on a texture have no effect: It should work. At this point i have to ask you to send me your demo.
  5. @dWolf Welcome to the forums! As you see, answer to your question is not safe for newbie it requires knoweldge of both how can you get data from canvas2d and webgl, and webworkers. At least its in production. If you want just a prototype with small texture - using PIXI extract plugin on renderTexture and iterating through pixels should work. Extract is bundled in PixiJS, it wont be a problem to find it. If you want to go into production and cover all the devices - well, you have to learn all those things @eXponeta mentioned.
  6. you can set breakpoint in texture setter with condition that checks null/undefined, then you'll understand how exactly null is getting there
  7. Yeah, i think @eXponeta solved that for his game. He can make you simple demo because his code is usually reusable
  8. yeah, that should do it. Btw, if you want to make shader for graphics or sprite, here's an example: https://www.pixiplayground.com/#/edit/zmDpwnZkvbb1b-aWaO9S8 Its batch shader . If you want to make gradients, I can help with that too.
  9. you guessed right, its related to texture options. Its about REPEAT Switch it off. "baseTexture.wrapMode = PIXI.WRAP_MODES.CLAMP" with LINEAR, edge pixels when scaled are interpolated with pixels from opposite edge.
  10. Why is "outputMatrix" needed in filters? To position a texture over it, for masking or displacement. Filter area is defined by container bounds, but to define texture coords relative to that area its better to do so through sprite, we can put calculated sprite transform matrix inside filter for it.
  11. > And then I rotated the sprite by 45, then as you can see, my expectation is it only draws pixels inside the blue rectangle I marked on the bottom right. How filters work: container is rendered into temporary texture. It doesn't matter what is the shape of container - filter area is rectangular parallel to screen axises. Then the quad drawn on screen: shader has that old temporary texture as an input "uSampler". Your "gl_FragColor = vec4(color, 1.0)" means that alpha is always 1.0. If you do not use input from "uSampler" and you are asking the question - you are using wrong abstraction. You do not need filter. You need mesh shader: https://pixijs.io/examples/#/mesh-and-shaders/triangle-color.js Its the basic abstraction of webgl, If you read https://webgl2fundamentals.org/, you'll understand how webgl is all about those shaders. Why pixi books contain only filters? Because v4 didnt have a good way to define shader for mesh. It had only https://github.com/pixijs/pixi-plugin-example and it didnt exist just after v4 release, I had to make it. Why filters even needed if they are good not solution for your case? Why were they main solution for PixiJS v4 and v3? Because of need to apply shader to SEVERAL sprites at once, without need to think of their rotations, scales, e.t.c. - main case is BlurFilter. Filters can work with several passes and be much more effective than just mesh shaders - blur uses horizontal blur, then vertical, several times, to get desired effect - its very hard to do with just one shader pass. How to fix your example easily? Well, use `uSampler`. Take a "texture2D(vTextureCoord, uSampler);`. Take alpha from it. Here's another example for mesh shader: https://www.pixiplayground.com/#/edit/6ThqOOz-SVJe3AyvkbnaU
  12. Here, I'm changing strip texture to WHITE and back on click: https://www.pixiplayground.com/#/edit/yMxrmJL59TO_H9zyKvDsf
  13. it should work. Maybe something wrong with your new texture?
  14. run a profiler , make memory dump - you should see nunmber of objects of every type - and when you click on any object , you can trace who exactly references it
  15. OK, i really should stop flooding here. contact me in t.me/hackerham , i remember we had a chat about your problems before.