Jump to content
  • Advertisement
Sign in to follow this  
gedebook

[hlsl] using Buffer keyword in .fx

This topic is 3290 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 actually would like to implement a dynamic array (not fixed array) in hlsl. But i'm having difficult to do this. Does any one knows how to doing that? I read the dx sdk. Perhaps the datatype Buffer would allow me. But i wonder, how to assign value from cpu into gpu. Please help me. =)

Share this post


Link to post
Share on other sites
Advertisement
Out of interest, why does it need to be a dynamic array?

If you know the maximum size the array could be, you could implement it as a fixed size array of that size, the shader won't care if the values you pass to it don't completely fill the array.

Share this post


Link to post
Share on other sites
@sirob i currently use dx10

@adt7 seem to be odd, my theory about hlsl is less still :(

Now, i currently implement for multiple materials in one 3Dmodel. I wish the gpu would process them all by assigning these multiple materials, like diffuseColor, specularColor, specularPower, and others without accessing per material value by cpu using 'for loop'. It would be slows the cpu performance, doesn't it?

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!