How to improve performance with many transparent textures simulating a nebula

Hi,

first, I find it very confusing to create a topic. I enter the Graphics subforum from the left side and then I click on New Topic but than it forces me to select a subforum and the Graphics category is not there anymore. So I hope the default Unity Engine is correct.

So my problem is that in my sci-fi game I use a very simple VFX Graph spawning and moving a few hundred 2D flipbook textures around to simulate a nebula.
I noticed that my FPS goes down from 220 to 140 just by using this effect. I read that transparent textures often cost some performance in unity, but this much is strange.

I am pretty sure I am making something wrong or not optimized enough. The texture is a flipbook of size 2048x2048 with alpha as transparency. I use a Output Particle Quad where I just set the Main Texture and thats its. I spawn about 600 of these particles. I guess in average there are maybe 20 of these particles on screen at the same time. Maybe 40 max.

Any help is much appreciated!
Thanks

Morning :smiley:
it’s very difficult to know exactly why your framerate is dropping without more context and precision.
FPS can drop due to overdraw, too many particles, memory etc… This also can vary a lot based on your VFX setup, but also your scene and/or hardware.

Now, in general, VFX often use transparent shaders on Particles that might lead to overdraw issue.
I suggest that you take a look at this post that explains it and see if this applies to your VFX Graph.

You can also try the new Profiler Tool that is real-time and easy to use. Here’s a Unite 2024 Session where the profiler usage is explained.

I hope this will help you with your FPS drop. Have a great day

Thank you very much!

Sadly in the new forum I can not attach any picture showing you my setup for the very simple VFX graph (or I am blind).
However I tried some property changes and reduced amount of particles and I could already improve performance a lot (still not optimal).

I will check the video and do some more research to solve the issue. I have a high end PC with an 4080RTX and 7800x3d with 32GB ram. So its not the hardware for sure.

Is this in the editor, or in a build? Always check build performance, because of editor overhead.

Also, keep in mind that a drop from 220 to 140 FPS is not as much as it may seem: the frame time for 220 FPS is about 4.5 ms, and for 140, it’s about 7ms. So there is only a 2.5ms difference between them (that’s not nothing, but at lower frame rates it would have a smaller impact). For comparison, that’s the same difference as between 100 and 80 FPS. You should always use frame time for measuring performance, because it’s linear, which FPS is not. You should also check if you are CPU or GPU limited. In the editor, it’s more likely to be CPU limited, again because of overhead.

Best practices for profiling game performance | Unity
Detecting performance bottlenecks with Unity Frame Timing Manager