Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Yeferson last won the day on July 16

Yeferson had the most liked content!

About Yeferson

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes, it was simple. Add two more parameters to tilemap (options.anchorX and options.anchorY) then put the X and Y with the following modification (tileWidth and tile Height already have the scale alteration): pb.push(x - tileWidth * anchorX); pb.push(y - tileHeight * anchorY); And ok, I'll see Freya Holmer. Thanks again for your help.
  2. Now I need an anchor for the textures. Ah sh**, here we go again.
  3. I had never used webgl, and shaders only a little bit in Unity3d, but a couple of videos from The Cherno, your guidance and following the logic of the code were enough. Thank you.
  4. Ready, I did it: D Just add one more parameter (options.scale). 1. Add scale in options params. 2. Multiply that scale by tileWidth and tileHeight 3. Put scale in points. 4. Create a new element "SCALE" in the enum "POINT_STRUCT" 5. Add an "aScale" attribute in tilemap.vert and TilemapGeometry and set the vertSize variable to 14, also pass aScale as vScale in tilemap.vert. 6. Add a varying "vScale" in tilemap.frag. 7. In shaderGenerator divide 1.0 / vScale and multiply that value by uSamplerSize. textureCoord * uSamplerSize [$ {i}] * (1.0 / vScale) 8. Finally add my sca
  5. Do you mean that if I edit the size of the vertex (which is a quad) then the size of the texture is edited? To test change the size of Width and Height by forcing both to 50 and what I show you in the image above happened, the texture is cut but not scaled.
  6. I already profile and looked closely, I had intensive use in my grid, this because every time the camera moves it adds another column or row, and adds all the sprites that that grid contains. That's the abnormal in the profile, so if I fix that using tilemap then I won't need the grid.
  7. I did it, add a "scale" parameter inside options, and scale the size of that point but the texture is not scaled, it appears cut off I am not an expert in shader, can you guide me on how to change the size of the texture by shader? or should the vertices be modified? I have read about Webgl, glsl, etc but I can't find the solution.
  8. Hello, me again. I have been trying to create the multiple scales in tilemap but I run into a problem, from what I understand, tilemap paints all the textures on a single mesh, right? that is, to make it work multiple sizes do I have to create a copy of the texture and use setSize ()? I need guidance on this problem pleas.
  9. I have a question, before I embark on the adventure. I would like to know if I can create a batch rendering with different textures using Geometry (https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js)? Do you think that if it would help me improve my performance?
  10. Do you mean to copy the Tilemap files to add the function multiple scales? I think it's a very good idea, I'm going to do it but if I have any complications along the way then I'll write to you to help me
  11. Yes, i make a profile and the render consumes more resources. In addition to the sprites, I also have some Graphics but I deleted them and the fps still lowered. I also had thought about using Tilemap but for my sprites I use different sizes, I couldn't find how to add a tilemap with varied scala. I think I'll have to use the RenderTexture to see how it goes.
  12. I have a problem to render approximately 300 sprites in pixijs, on my pc it works perfectly, but on my phone the fps to lower and the slowness is noticeable. It is possible that the slowness is due to the number of sprites, I had planned to generate a grid of RenderTextures and render all the sprites in groups, but I don't know if that works. I designed a system to recycle the sprites and use them elsewhere if they are not shown on the screen, I also used a grid to divide my map by sections and improve the optimization. Image: https://ibb.co/hmmYS5J This amount of sprites l
  • Create New...