Jump to content
  • Advertisement
Sign in to follow this  
Funkymunky

DX12 Vertex Shader to Multiple Pixel Shaders

This topic is 379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm doing some mesh skinning in my vertex shader, and I have a depth pre-pass in place.  I'm not crazy about doing all the vertex transformation twice for the skinning; is there a way to have one vertex shader be the input to multiple pixel shaders?  Or do I have to do a vertex shader stream-output, and then set that as the input for the pixel shader somehow?

Share this post


Link to post
Share on other sites
Advertisement

Unless you are skinning thousands of characters several times or run on a very weak hardware, it won't matters much. You can compare skinned and non skin shader with profiling to confirm.

Output of skinned meshes with compute or stream output will add complexity, memory management, possible gpu flushes for nothing.

 

There is other factors for your depth prepass, like a separate vertex stream without UVs and un split position for the index buffer. Don't forget to optimise the index list, vertex order and element size ( half vs float, etc, ... ). And a depth prepass is a good candidate for a front to back sorting.

Share this post


Link to post
Share on other sites

Cool.  So just to be clear, on a technical level, the options are either stream-output or compute shader transformation to a buffer that I then bind to a pass-through vertex shader?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!