Jump to content
  • Advertisement
Sign in to follow this  
schupf

HLSL register

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

Hello!

I have 2 little questions about HLSL shader registers:

1. According to this site: http://en.wikipedia.org/wiki/High_Level_Shader_Language , VS 3.0 offers at least 256 constant registers. Does this number refer to the number of the float registers c0, c1 etc. or is this the sum of ALL registers (integer, float and bool registers)?

2. If I want to update a single float variable in my shader per SetVertexShaderConstantF, is the following code correct?

float foo = ... // This is the value I want to put in the shader variable
float data[4] = { foo, 0, 0, 0 };
device->SetVertexShaderConstant(0, data, 1);

Is this code correct? I need this float array, don't I?

Share this post


Link to post
Share on other sites
Advertisement
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!