Sign in to follow this  
Alundra

GPU Particle Update

Recommended Posts

Hi,

Is it a good way to have one compute shader for each particle module (velocity, color .....) which is called in an update function ?

For curve generate the texture 1D when the curve changes.

Thanks

Edited by Alundra

Share this post


Link to post
Share on other sites

It's probably better to have one compute shader that does everything, possibly with conditional compilation if needed. The old "ubershader" approach, basically.

Share this post


Link to post
Share on other sites

Is it really bad to have one compute shader by particle affector ?

Try it and find out. It's probably slightly more optimal to use a single shader... but sometimes it's a better choice to waste a bit of performance to gain a bit of flexibility.

Using that no one particle affector can be added without change the engine directly.

Shaders should be data files like a model or a texture. You definitely should be able to edit shaders without changing the engine... Ideally you should be able to edit shaders while the game is still running and see live results!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this