I am not getting any errors in the console, and am unsure as to what could even be causing the problem.
I am on Unity version 2020.3.13
Both the URP and Visual Effects Graph are version 10.5.1
My laptop has the following specs:
Processor 11th Gen Intel(R) Core™ i9-11900H @ 2.50GHz 2.50 GHz
Installed RAM 16.0 GB (15.7 GB usable)
System type 64-bit operating system, x64-based processor
The specific particle in the image is from this package if it matters / (this issue happens with all vfx graph particles, not just this one)
Hello! We’re having this same problem in our project, Unity version 2021.3.7f1, Visual Effect Graph version 12.1.7. I’ve tried looking all over the forums for this answer, but does VFX Graph just not yet support lit effects in the 2D URP pipeline?
I’ll start with that quick question first, but can follow up with more details if needed. Thank you!
So maybe we’re just out of luck for the time being with lit effects via VFX Graph in 2D URP. The roadmap doesn’t mention anything, but any idea when we might get this feature? Thanks!
Oh good find! Man I’ve been really struggling to find where information like this exists, it seems very scattered. There’s the roadmap of course (which, even that, it took me forever to land on), but that doesn’t have any estimated releases or timelines for specific features like this. Anyways, thanks for the reply!
I have encountered problems like these multiple times because I was stupid and vfx were turned off for the viewport specifically inside this menu (but overall the button was set to active, or the other round)
Credits for Gabriel&Julien who kindly shared their knowledge.
What is VFX instancing supposed to do?
Batches similar effects to reduced amount of draw calls. We can batch effects into one draw call or render one by one but all together.
Many VFX instances are rendered in a single batch when:
No indirect drawing is present (no sorting, no transparents)
No immortal particles or spawning from GPU events
Instances are rendered one by one in all the remaining scenarios.
Instances can be batched together only if the same amount of particles are rendered for each instance. When indirect drawing is not used, the entire capacity is rendered.
How to enable it?
It is enabled by default when possible (if instancing can not be enabled check Inspector of VFX asset for the reason) except on pre-existing VFX. To manually enable instancing:Make sure that:
Allow Insatancing is enabled in VFX component
Make sure that Instancing Mode is set to Automatic batch capacity/Custom batch capcacity
Features that are supported by instancing at the moment(green - supported; red - not supported right now):
Transparents.
Uses sorting.
Use any ShaderGraph material
Has particle strips
Uses GPU particle mesh output
Exposes Gradient, Curve properties
Uses Output events ☒
Uses GPU events ☒
Has Mesh outputs ☒
Exposes variables that are Texture, GraphicsBuffer, Mesh Output or Skinned Mesh ☒
Bits about performance:
With high capacity systems becomes less relevant
Once GPU bound is reached, performance gain will not be seen on FPS. GPU gain can be seen on very small particle systems.
Reduced draw call count is expected
Compute shaders for Initialize and Update are batched too
Reduced CPU timing, especially in Update dispatch
Less commands with instancing (for instance: commands are skipped when VFXs are not visible by the camera)
does “not supported right now” mean they are just not finished yet but expected to make it into a soonish release or are these hard constraints that probably will never get instancing support?
I’m a little surprised that " Mesh outputs" are not instanced and “Exposes variables that are Texture”.
Does this mean that VFX that are using the same texture but this texture is exposed are not instanced ?
@fleity We want to extend support for more features such as GPU Events, unfortunately don’t have ETA on how soon it will happen. Judging from the roadmap there are no plans to extend it in 23.1, will double check with the team and get back to you (this will take a bit).
@koirat Yes, that’s correct for CPU Mesh Outputs (developers rescued GPU Output Particle Mesh - it works with instancing). About the texture bit - also correct, once texture property is exposed in the blackboard - instancing is disabled for that asset.
I am a bit confused, what is GPU and CPU mesh output?
I understood it this way: any output block can be instanced as long as their things (parameters/outputs) are “baked” into graph (it is not possible to set them from outside).
Also what means transparents in their contexts, there is “(no sorting, no transparents)” and then later transparents
That transparency set in Blend mode is supported by instancing.
Let’s clear the confusion! This one meant that many instances can be batched into a single drawcall unless indirect drawing is introduced. If Alpha Blend Mode is set to Alpha (for example) - we introduce indirect drawing here and then instances are rendered one by one but all together. You may want to give a try for Frame Debugger or Render Doc it will clearly show what’s behind the curtains.
Let me know if there’s anything else I could clarify.
For me these two things are contradiction - alpha blend mode is supported, but at the same time it’s not?
You mean different blend modes cannot be instanced or something completely else?
One more question - is it required that graph asset is the same? If I made two identical (or nearly identical) graphs with different names, then they are not going to be batched. (I guess)