They tricked me!I thought MixedResolution particle rendering was already implemented!
And in some ways it are... You see a lot of the functionality is already in there, but it needs a few changes to actually work!
I've managed to get it working and the performance boost is great!
For those of you who doesn't know, MSPF is milliseconds per frame.
Code: Select all
2 emitters, 1000 particles per second: Highres 27 MSPF // 8.5 MSPF hit MixedRes: 20 MSPF // 1.5 MSPF hit No emitters: 18.5 MSPF
WOW such a high performance boost for free????
Well yea... No, not really...
You see, the way this works is that we render the particles to a render target with 1/4 resolution of the main render target such that we significantly reduce the amount of pixels rendered.
This is especially useful if you suffer from overdraw performance issues, which happens when the camera is looking at particles up close such that each particle has to be drawn to each pixel.
However doing this introduces some halo-artifacts because of the lower resolution:
These halo artifacts can only be fixed by doing a high-res render... So what do we do? We do a high-res render! But to improve performance we do it ONLY where these artifacts occur! Well, how do we do that? We use the edge buffer from the EdgeDetect PostFx!
It looks like this:
And then when we composite the high-res and the low-res render, we get the final result!
So what was this I said about it not being free? Well the impact from doing this, is ofc the fact that we render the particles at 1/4 resolution, which makes the particles blurrier:
All of this is also explained at Nvidia's GPU Gems.
This effect gets enabled when you set "HighResOnly" to false, and in stock T3D, it doesn't work at all. I'll be PR'ing a fix soon.
Why are these features not active?I see so many of these unused features which are somewhat implemented in T3D, just not quite "finished". How many more are there?
There are more stuff on the particle side of T3D that has these hidden gems. The Particles shader has code that takes a lightmap and it seems to be lighting the particles in a way. Having lit particles could be awesome! Why aren't there any notes on what is needed to finish this?
Also the RenderParticleMgr has these:
const bool RenderToParticleTarget = true; const bool RenderToSingleTarget = true;I don't get it.. It works fine with rendering to a single target, what do we get from setting these to false and what are they supposed to do?
I think we should make an initiative to create a list of all these hidden features when we stumble upon them, and maybe a way to write down notes on the features such that we have a better ground to work from if we want to enable one of these features! Some of them are really great!
Edit: PR has been merged!