very unoptimized, takes a lot of resources in the draw event. went from 70 fps to 40 fps...
Viewing post in CyberPunk Hologram Effect for GameMaker Studio 2 comments
This is something that I address specifically in the description and in the video. The most unoptimized effect is the static effect, which does cause a performance dip. This effect is designed to be a learning tool for showcasing how to achieve some of these effects without having to know shaders, as well as an effect that can be used sparsely with minimal downside.
Running tests right now show that with all effects, except static, enabled, I can achieve an FPS of 2600+. Turning on static drops this down to 200+. If you are hitting an FPS of 40, then I would suggest you take a look at the rest of your code.
Feel free to reach out if you would like a refund on your $3. The reason I charge so little for these is because I create videos that explain how to do everything for free, and in that video I address these issues explicitly. Thanks
Would creating a sprite with several frames of static and then just blending the two together be faster? It wouldn't involve shaders and still be fairly simple.
Absolutely! You could even write some code that would generate noise, and blend that with the sprite. This would achieve an effect very similar to what we did in this asset. However, blending sprites in game maker is not as easy as it might seem. The only way I was able to accomplish Sprite blending in another project, was to write each sprite into a buffer, and then read each buffer simultaneously, while writing the combined results into a third buffer, and then translating that buffer data back into a sprite. I’m hopping to finish up this project and release it as another tutorial so that I can show how to blend sprites. Feel free to DM in twitter if you have any specific technical questions and I can try to help out :)
Hmmm... I see. I don't know GameMaker well enough for doing tricks but if I were to do this in Photoshop, I would just change my noise layer to Multiply or Luminous and use the clipping to force it to the shape of the main sprite. Couldn't you use something like: sprite_set_alpha_from_sprite() to clip the noise sprite to the same shape of the main sprite and use gpu_set_blendmode_ext() to achieve the blending mode by drawing the main sprite with it's alpha setting and then the noise sprite with an alpha setting of 0.1 to combine them? Or is that too slow?
I sincerely hope you're able to accomplish this. I want to do something very similar with layered sprites to show battle damage over the course of a game from beginning to end (granted, that is a very long time from now) and I haven't had a whole lot of luck in actually finding any documentation that supports this, or even speculation that it might be a thing without serious performance issues.
Thank you for this awesome asset! I'll be purchasing it in the near future and hope to make use of it, but if nothing else, it looks really fun to play and learn with. :)