Sign in to follow this  
lucky6969b

AMD FixedFuncShader isn't compatible with newest HLSL

Recommended Posts

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

[code]
bool bSpecular : register(b0) = false;
[/code]

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

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

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