tsm

Members
  • Content Count

    11
  • Joined

  • Last visited

About tsm

  • Rank
    Member

Recent Profile Visitors

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

  1. tsm

    Shader performances

    Hi Shukant, Great news, I'll check it, thanks.
  2. tsm

    Shader performances

    Thanks for the link, I will study that, I wasn't aware of premultiplied alpha, it's interesting (it is blewing my brain already 😄).
  3. tsm

    Shader performances

    Ok never mind, multiplying my tint color with texture color.alpha is working like you did on your exemple. The code : https://www.pixiplayground.com/#/edit/v1ul6FO1tA5b9R4pQTf30 I still don't understand why gl_FragColor = vec4( textureColor.rgb, 0.0) is showing some pixels, but I'm not experimented with shader. Thanks a lot Ivan !
  4. tsm

    Shader performances

    Sorry Ivan, I was doing some tests on pixiplayground and wrong code has been saved. This is the code I was talking about : https://www.pixiplayground.com/#/edit/kEz5EE6EnJtA-gWPw1O8B I don't understand why the alpha parameter (color.a) has no impact. Even if I set it to 0.0, I still see some pixels.
  5. tsm

    Shader performances

    Hi Ivan, hope you are doing well. I'm struggling with the shader in the batcher you help me build : https://www.pixiplayground.com/#/edit/U3Sk72dkfAG0ZjriNxE4r My alpha channel isn't working correcltly, even with 0.0 instead of color.a line 14, I can't get the correct transpancy. Even with vec4(1.0, 0.0, 0.0, 0.0) I have red with no transparancy at all. Do you see where's my error ? Thanks.
  6. tsm

    Shader performances

    Thanks for the advice Ivan. The app I'm developping needs to display thousands of sprites with thousands of differents textures, atlases are interesting but I think I gonna have some problems with depth sorting. Every sprite can change his depth at any moment. Atlases is the next performance feature I need to test but it's not gonna be now. The batcher I implemented thanks to you makes a great difference, it is sufficient for now.
  7. tsm

    Shader performances

    Hi Ivan, I managed to make my plugin factory. It's great, I can display my special sprites with less drawcalls & the framerate of classic sprite. Thanks a lot for your time ! https://www.pixiplayground.com/#/edit/QEGbh9v-WSwHTWX6-I1ew
  8. tsm

    Shader performances

    No problem Ivan, I'll do it. Thanks again.
  9. tsm

    Shader performances

    Hi Ivan, I tried to use the BatchPluginFactory, I managed to provide my vertex & fragment shaders, geometry, and vertexSize, but do you know how can I override the inteleave ? Here is my code : https://www.pixiplayground.com/#/edit/MhxqhNXcDOlx6uq0x6ezx Thanks
  10. tsm

    Shader performances

    Hi Ivan, thanks a lot for your quick answers. I'll check your batchrenderer exemple it looks very interesting for my problem.
  11. tsm

    Shader performances

    Hi everyone, I work on a particule engine with thousands of particles and thousands of differents textures. I need to be able to tint particles with a different amount of tint for each particles. So I made a shader to do this and use mesh instead of sprite, but the performances are really bad with thousands of particles. I think the shader I made can't be simpler, does Pixi does something internally with sprites that mesh doesn't have ? Here's a exemple with the shader : https://www.pixiplayground.com/#/edit/DuEeDDzZltSRzeAwrWJiy Particles number and mode (mesh or sprite) can be tweeked to see performance differences. Thanks a lot.