Sign in to follow this  
howie_007

Setting global variable in shader

Recommended Posts

howie_007    285
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.

Share this post


Link to post
Share on other sites
MJP    19790
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.

Share this post


Link to post
Share on other sites
howie_007    285
Quote:
Original post by MJP
Since you said "BeginPass" I assume you're using Effects.
Yep.

Quote:
Original post by MJP
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.
What is PIX?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this