Advertisement Jump to content
Sign in to follow this  
Drats

shader problem

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

HI For my project, I am loading about 4 different mesh models (xfiles) into my scene. I have one fx file where I have all my lighting calculations, vertex shaders, loaded into the project which works on the entire scene. I now want to load a separate fx file with shaders which will work only one one of the models. Can anyone give me pointers on how can I do this? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Well the most obvious route to take is to create some sort of mesh wrapper class that can encapsulate the functionality and mesh-specific data. The .X format is capable of storing an effect and parameters for each material in a mesh. You could retrieve the data upon loading, then store a reference to the shader being used for each material in your mesh.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!