Sign in to follow this  
click

multiple vertex shaders?

Recommended Posts

click    122
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

Share this post


Link to post
Share on other sites
Jroggy    172
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).

Share this post


Link to post
Share on other sites
click    122
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?

Share this post


Link to post
Share on other sites
Evil Steve    2017
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.

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