multiple vertex shaders?

Started by
2 comments, last by Evil Steve 15 years, 4 months ago
I have work for project. I write multiple vertex shader for a mesh. First one calculates bump mapped reflection shader which is name "Bump.vsh" and second one calculates point light mathematics. But when i run before Dravsubset() function i cannot see two of them on the mesh. I can see just one of them. Is there any rule for running multiple vertex shader together? Thanks, Ibrahim
Advertisement
If you mean you're trying to use two vertex shaders on one mesh, then yes, there is a rule. You can't. You are only able to use one vertex/pixel shader on a given mesh.
You will need to either use another pass or combine the shaders (which would be faster).
Thank your for replying. Yes, that's true. I want to use two shader for one mesh.

For "combine", do you mean that instead of using two shader, to write shaders into the one shader? Or different? Is different how can I do that?

Quote:Original post by click
Thank your for replying. Yes, that's true. I want to use two shader for one mesh.

For "combine", do you mean that instead of using two shader, to write shaders into the one shader? Or different? Is different how can I do that?
Yes, you'd make a third shader which does the same as both shaders together, and then just use that shader.

This topic is closed to new replies.

Advertisement