Alienhead Posted March 9 Share Posted March 9 I havent messed to much with the particle system in ultra, but today was the day. I created 1 simple little emitter, 20 particles. I placed it on the map in 3 locations and proceeded to RUN. This is a very strong Nvidia gpu I'm using and it brought it to a crawl.. 3 little emitters sat me down to 28 fps ! Normally I clock around 400 to 600 fps. Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Josh Posted March 9 Share Posted March 9 This is happening because of the expensive lighting calculation on each pixel of each particle. The bottleneck is the 3x3 shadowmap lookup, primarily. I first noticed this in the FPS example where there's a particle emitter underneath a turning spotlight. The solution is for me to detect transparency and only use a single shadowmap texture lookup, or to use the Unlit shader family for particles that don't need accurate lighting and shadows on them. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted March 10 Solution Share Posted March 10 Here is the scene I am testing with. particlestest.zip 180 FPS on a Radeon 6600 at 1280x720 resolution. In Shaders/Base/Lighting.glsl I made a change that uses a single texture lookup if transparency is in use, and the framerate went up to 200: #if KERNEL == 3 if ((RenderFlags & RENDERFLAGS_TRANSPARENCY) != 0) { return texture(shadowmap, shadowcoord).r; } That's a little bit faster, but not a huge improvement. I then changed the particle material to use the Unlit shader family, and the framerate went way up, but particles are no longer affected by lights. I can only conclude that rendering many transparent layers of lighting is expensive, and don't use it unless you really need it. Perhaps in the future a per-vertex lighting mode will be added. This would help particle systems to blend in naturally to the surrounding lighting environment, but would be much less expensive than many layers of per-pixel lighting. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Alienhead Posted March 10 Author Share Posted March 10 Now were talking ! Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.