Setting global variable in shader
When making the calls to set global variables in your shader code, is it a correct assumption that these values are held by DirectX and then set to the video card when making the "beginPass" call?
I was originally under the assumption that the video card was being set when these calls are made but the more I think about it, it can't work that way especially when there's more then one shader loaded.
Since you said "BeginPass" I assume you're using Effects. Effects will indeed cache values of shader constants and will set them onto the device when you call BeginPass. If you'd like you can use PIX to capture a frame, and you can expand your BeginPass call to see all of the actual D3D calls being made under the hood.
Quote:Original post by MJPYep.
Since you said "BeginPass" I assume you're using Effects.
Quote:Original post by MJPWhat is PIX?
If you'd like you can use PIX to capture a frame, and you can expand your BeginPass call to see all of the actual D3D calls being made under the hood.
PIX is pure awesomeness. There's a quick rundown of the features on my blog. There's also plenty of documentation on MSDN.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement