Creating New Effects

Top  Previous  Next

The actual DPSFDefaultEffect.fx file is also provided in the Templates folder and may be modified if you like.  This allows you to use the built-in shaders while simply adding additional shaders, or to add additional global parameters, allowing you to create new Effects quickly and easily.  If you want though, you do not have to use the DPSF Default Effect file; you can create a completely new Effect for your particle systems, just make sure it supports the type of particles that you plan to use in the particle system.  If you create a completely new Effect you will also likely need to create a new particle vertex structure to match it.

 

To specify that the particle system should use an Effect other than the default, set the particle system's Effect and Technique parameters after initializing the particle system.  You may also use the particle system's SetEffectAndTechnique() function to do this as well.