Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Pixel Shader 3.0 unexpected results


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 danromeo   Members   -  Reputation: 237

Like
0Likes
Like

Posted 19 February 2012 - 08:56 PM

Just when I think I understand shaders they throw me a curveball every time.

This seems SO simple. I have a Vector 3:
pos=new Vector3(1024,1024,1024);
and a shader constant float3 EyePosition
I assign my Vector3 to my shader constant just before the draw call:
Effect.Parameters["EyePosition"].SetValue(pos);
This variable is not used or altered anyplace else, in either the program or in the shader.
BUT, when I debug the pixel shader in PIX it shows EyePosition= (414.855, 823.112, 1024.000, 0.000);

Can somebody please explain to me WHY (tF!) my constant is getting changed? Is the interpolater being invoked for some reason? I hate asking dumb questions but I can't see any logical explanation for this whatsoever.

Thanks

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS