Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualAdam_42

Posted 08 January 2012 - 11:57 AM

Normally you'd let the hlsl compiler do the constant register allocation and it will return you a constant table to tell you where it's allocated them. The downside of that approach is that you'll have to set all the constants up every time you switch shader, because the register numbers can change.

If you don't want to do that then you should definitely reuse the same register numbers for both the pixel and vertex shader - they won't conflict.

By the way almost all PS 2.0 cards I know of are Intel motherboard integrated ones, and are rather slow.

#1Adam_42

Posted 08 January 2012 - 11:55 AM

Normally you'd let the hlsl compiler do the constant register allocation and it will return you a constant table to tell you where it's allocated them. The downside of that approach is that you'll have to set all the constants up every time you switch shader, because the register numbers can change.

If you don't want to do that then you should definitely reuse the same register numbers for both the pixel and vertex shader - they won't conflict.

PARTNERS