Particles Causing Slow Rendering

Started by
11 comments, last by C0lumbo 10 years, 9 months ago
Yes, the problem is related to the pixel fill rate.
How do I remove pixels with zero alpha blending in Pixel Shader?
I also can't compare the depth and remove particles according to the scene depth because there could be transparent mesh
@C0lumbo: > "Have your particle system fade out particles as they get close to the camera"
What do you mean exactly? Do you mean changing the alpha channel for particles close to the camera?
@belfegor: Any code sample or tutorial?
Advertisement


I also can't compare the depth and remove particles according to the scene depth because there could be transparent mesh

Yes, you can. Transparent meshes usually won't be rendered to the depth buffer anyway, so that should not hinder you. You will also most likely want transparent meshes sorted by depth so you can draw them without depth write from back to front, including all transparent particles. So just that there could be transparent meshes, doesn't hinder you from using the depth information of the opaque scene.


@C0lumbo: > "Have your particle system fade out particles as they get close to the camera"
What do you mean exactly? Do you mean changing the alpha channel for particles close to the camera?

Typically in particle systems you generate an RGBA colour per vertex and pass that through to the pixel shader which will multiply the vertex colour with the texture colour. When you generate your particle vertices, you need to calculate the distance from the camera for each particle and use that to drive a fade out for particles that are getting close to the near plane.

This topic is closed to new replies.

Advertisement