Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

AMD FixedFuncShader isn't compatible with newest HLSL

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

D:\Users\Documents\Visual Studio 2010\Projects\PerfectSim\PerfectSim\FixedFuncShader.fx(27): error X4556: Error: invalid register 'b0' in register binding.


bool bSpecular : register(b0) = false;


What's wrong?
I am not very pleased with MS gradually... Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement
http://msdn.microsoft.com/en-us/library/windows/desktop/dd607359%28v=vs.85%29.aspx

Yeah, solution, trivial but troublesome

Share this post


Link to post
Share on other sites
In SM4 and up, shader constants do not have dedicated registers at all; instead, equivalent (and much more flexible) functionality for passing data from host to GPU is provided by constant buffers.

In SM3, the "b" registers were used to send boolean values to the shaders. Nowadays, the "b" denotes "buffer".

In SM4 and up, when you define a global constant outside any constant buffers, it is allocated in a global constant buffer. While you can't assign a specific register to it, you can still use shader reflection to find its buffer and offset from within the host program. Edited by Nik02

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!