• Advertisement
Sign in to follow this  

refactoring my HLSL implementation code. need opinions

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

My code is clunky and I feel the shader part of my game is critical for performance so i'm gonna bite the bullet and try to get it right the second time around :P - First off, I don't want to use the traditional DirectX materials. I'm going 100% shaders for everything graphics. - My .X files will say what material uses what shader but I want to use a struct that could override the parameters of my .X shader values (like DIFFUSE color etc) - I want to keep the "SetValue()'s " to an absolute minimum. I want to set it once in a constructor and only use the SetValue if my values changed. I was thinking of implementing an event for this but i'm not sure this is a good idea in the middle of a render loop. The DX API is big. Maybe I missed a Class that could help me? Any input appreciated. V.

Share this post


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

  • Advertisement