Sign in to follow this  

How to Configure STRUCT ConstantTable with DX9

This topic is 740 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

I have written code with DX9 that uses HLSL pixel shaders and configure their constants with SetPixelShaderConstantF, SetPixelShaderConstantB and SetPixelShaderConstantI.

 

I've come across this shader, which is PS_3_0, but it is using STRUCT as input instead of float4.

https://github.com/zachsaw/MPDN_Extensions/blob/master/Extensions/RenderScripts/Super-xBR/super-xbr.hlsl

 

How do I configure that?

Share this post


Link to post
Share on other sites

Well... after further investigation, it turns out the STRUCT doesn't appear to be used at all; rather, the parameters were defined in the separate included file. Those are standard vectors.

Share this post


Link to post
Share on other sites
Note that the Set* methods mentioned have a count parameter, which will specify the number of constants to set.

If your structure is comprised of one constant type (such as float4), you can effectively use the count parameter to pass it to the device with one call.

Share this post


Link to post
Share on other sites

This topic is 740 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.

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