01-07-2020, 11:47 AM
(This post was last modified: 01-07-2020, 11:50 AM by josemendez.)
(01-07-2020, 11:23 AM)emz06 Wrote: Hi,
I disabled all my gameobjects in the scene, and the screen is black.
I have two problems:
1) When my emitter & solver's gameobject is enabled, it still counts as several draw calls, even though:
-it is behind the camera (not shown on screen)
-the speed of emission is zero
2) Even when I disable all emitters and solvers in my scene, I still get 10 draw calls, and this is what I see in Frame Debugger:
https://imgur.com/a/nh3AuMy
How do I make sure I only get those draw calls when it's emitting AND on screen?
Thanks
Fluid rendering uses a technique known as screen-space ellipsoid splatting. This is similar to a deferred renderer: several fluid properties are rendered to offscreen buffers (thickness, depth, normals, color, etc) and then composited in a final pass. This happens once per frame regardless of how much fluid particles are on screen. So it pays a fixed cost of generating these buffers, just like any deferred renderer. The good news is that this cost is only dependant on screen resolution, so performance is the same regardless of how many particles are on screen.
The solver has a IsVisible property that will return true if the solver bounds intersect any camera's frustum. You can use this to enable/disable the renderer when needed.