Sign in to follow this  
Quat

d3d9 Vertex Inputs

Recommended Posts

I have a shader that emulates the fixed pipe for a simple project. I have flags to disable lighting/texturing. The vertex shader inputs, position, normal, texture coordinates. Can I use the shader to draw from vertex buffers that only have position and normal info? Obviously in this case the texture coordinate parameter in the vertex shader won't be valid, but I will have a flag to disable the texture sampling, so this shouldn't affect the output.

Share this post


Link to post
Share on other sites
Run your shader via the fxc.exe command-line to see what assembly is generated. If you output to colour-coded HTML it should draw a summary at the start of each shader indicating the constant layout and pipeline mapping.

I would hope that the compiler will remove the input TC's if it also removes any code that might depend on them, but I'd double-check to be sure.

hth
Jack

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