Jump to content
  • Advertisement
Sign in to follow this  
MysteryX

How to Configure STRUCT ConstantTable with DX9

This topic is 899 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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!