Jump to content
  • Advertisement
Sign in to follow this  
george7378

Sending different structs to float4

This topic is 1944 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 everyone,

 

I've got a quick question: I have a float4 in my effect file, and it seems to work the same if I use SetValue() to send in a D3DXVECTOR4 or a D3DXPLANE from my program. Is there a difference between sending each type to the accommodate the float4 in my shader? What if I made a custom struct and tried to send it to my float4 using SetValue()? Also, what would happen if I tried to send a D3DXVECTOR3 to a float4?

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement

You are sending pack of bytes so it doesn't matter if it is D3DXVECTOR4, D3DXPLANE, MyColorClass4, __m128, or Foo

If you send less data then it needs then that is probably filled with garbage values.

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!