Clément Faure Posted August 30, 2021 Share Posted August 30, 2021 Hello I have an application where i need to display approximately 1000 elements (with 5 main shapes and dynamic colors). I have think at several different approach : - Using only Graphics but as it is says in the documentation (Using 300 or more graphics objects can be slow, in this instance use sprites, if you can create a texture to share between them.) - Using Sprites from Textures from Graphic (the problem of this approach it that i have elements colored dynamically, and i'm not able to generate a Texture from a Graphic => I don't want to use either @pixi/canvas-graphics) - Using Shaders I don't have any overview regarding shaders performances. Is it better than Sprites ? than Graphics ? I would like to make the right decision in terms of performances and good practices. Thank you in advance. Have a good day ! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 31, 2021 Share Posted August 31, 2021 colored dynamically with one or multiple colors? IF 1000 graphics wont work for you - yes, you can make shader that will handle color. it can be mesh-shader, it can be batching. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 31, 2021 Share Posted August 31, 2021 As for best practices, all the variants how to do it - im sorry, that' sa big topic, i explained this at forums many times but i failed to have time to compile all that in a book. Please provide demo of 1000 graphics that is slow, then we can talk about it. Quote Link to comment Share on other sites More sharing options...
Clément Faure Posted August 31, 2021 Author Share Posted August 31, 2021 Hello, Thank you for your quick response. I went for mesh-shaders (It was with multiple colors). Have a great day. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.