Jump to content
  • Advertisement
Sign in to follow this  
vidalsasoon

HLSL: EffectInstance question

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

Reading my .x file, I get a list of 2 EffectInstances. The first one points to my goochy2.fx file which is OK. it also contains some values that seem alright like WorldIT, View... these are values that maya plugged in during the conversion. This is ok for now. The second one has no file information... its just empty. However it does contain shader values like DIFFUSE, POWER, AMBIENT which all contain good data. As far as i know, I should only be getting one EffectInstance from my goochy2.fx. why does this happen?

Share this post


Link to post
Share on other sites
Advertisement
You'll get one EffectInstance for every subset in your .x file mesh. When you iterate through the subsets, you apply the corresponding EI before rendering.

If your mesh only has one subset, it might just be extraneous data that Maya shoved in there. But be sure that you don't actually have two subsets without knowing it.

Share this post


Link to post
Share on other sites
EUREKA!!!

I just ignored the last instance as no matter what fx file I used, there was always that filler info (i assume). im so happy to get shaders to finally work :D

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!