Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Vertex Shaders

This topic is 6061 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

What is the best way to design a system around their use? Should I have one vertex shader for each item that requires one and set it''s textures/matrices from that object. Or if I have 4 or 5 things that use that shader but use different textures, should I use the same shader and change it''s texture depending on the object thereby sharing the shaders? THanks a lot.

Share this post

Link to post
Share on other sites
You should minimize shader changes as much as possible. Therefore, don''t have the spaceship shader, the alien shader, etc.

Instead, have the EverythingThatsToonRendered shader, the EverythingThatsBumpMappedShader, etc. (As much as it makes sense to).

Shaders and textures are mostly mechanically independent, meaning that you might have several bump map textures for different objects, but that doesn''t really mean that you have to have different shaders. In general, you want to mininize texture changes as well.

Share this post

Link to post
Share on other sites

  • 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!