torbycly

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hi Ivan, Thank you for your advice! Your presence on the forums has been a great help to me, thank you very much for all your work. PIXI shadows definitely looks interesting, but my knowledge on renderTexture and Layering is a bit short. I dont really understand renderTexture. When would you use it? And what is the benefit of it? Is it something like .generateTexture()? to ease the performance load? And in regard to layering, I currently just have nested containers, with one container that includes and sorts my map objects. How is layering with PIXI Layers better? Because you still have to add the containers to stage as well right? and then also the displayGroups and layersGroups? Thank you! hope to hear from you
  2. Hi everyone, I have recently been learning to code and currently am creating a 2d game using PIXI v5. I want to implement some interactive shadows, based on different light points on the map(lights) or "above" the map(sunlight). I still have a lot to learn about Webgl and the insides of PIXI, and I got some questions about some different approaches. I noticed that there is a plugin, PIXI lights, but unfortunately it does not work with PIXI v5. On different forums and tutorials I encountered some shader ideas that create a shadow of particular objects. This works perfectly. However, when applied to my object container, it will render the container as a single texture and create shadows that are of course not in sync with the place of the objects itself, but will appear as a combined shadow of the total combination textures. I have also tried some shadowing through normal mapping, could work great as well, but if feel is mostly suitable for creating shadows for the terrain of the map. As far as i could tell, PIXI lights is using some form of flexible normal map rendering. Im curious what you all think is the best approach to create simple moving shadows for a container of display objects. some questions: I dont understand a lot about the batch renderer, and if that would be the right area to find a solution? I noticed some thing about a batch renderer that uses a %forloop% in the shader and 'uSamplers', could this be usefull to implement inside a shader to id the textures of the individual sprites which are inside the container? Would it even make a performance difference to use the shadow shader on every object in the container or using 1 shader? Would it be beneficial to put the shader inside a PIXI.program in that case? Im looking forward to hear your perspectives. Thank in advance