Particle System and Vertex Shaders.
Im doing a project right now that requires me to use a particle system. What was suggested to me is to modify the particle system to use vertex shaders. I have no idea where to begin. can anyone suggest resources, books, tutorials, etc?
Thanks.
This is a tuffy because I currently run a particle system without using vertex shaders... but I might hafta begin using them just cause :). But "Programming Vertex and Pixel Shaders" by Engel will getcha started on simple knowledge of P and V shaders. Using D3DX Effect framework btw. I think ShaderX3 has a section on using them for particle systems, but the book assums you know the basics.
Before you jump into shaders, you should figure out if it worth your time. Switching to a vertex shader might be a waste of time.
Here are three cases where switching to a vertex shader might be a good idea:
1. You perform the same calculation (with the same values) on every vertex. For example, my particle system consists of rotating quads. Rather than rotate all the vertexes on the CPU, I rotate them in the vertex shader.
2. You want to do something that cannot be done with the fixed pipeline.
3. You want to use a pixel shader. Generally, if you use a pixel shader, you must provide a vertex shader.
Here are three cases where switching to a vertex shader might be a good idea:
1. You perform the same calculation (with the same values) on every vertex. For example, my particle system consists of rotating quads. Rather than rotate all the vertexes on the CPU, I rotate them in the vertex shader.
2. You want to do something that cannot be done with the fixed pipeline.
3. You want to use a pixel shader. Generally, if you use a pixel shader, you must provide a vertex shader.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement