Hi there! I hope I'm in the proper spot here. I've been trying for the life of me to try to figure out how a parallax shader works and have been trying to implement in the Source Engine. Needless to say I'm really held back by not having any math knowledge involving tangents, matrices, and whatnot.
But anyway, the question I'm asking is a little more simple than all that, and that's about the syntax of "const" in HLSL. There seem to be some shader header files that reference matrices and vectors that are labeled as const. Such as:
const HALF3 g_EyePos : register(c10);
I dunno if that's part of the HLSL language by default, I just know that in VS it says HALF3 is just a redefinition of float3. But why would something like g_EyePos, which clearly references eye position or camera position, be marked as const? Isn't that something that would be changing quite often? When I looked up the const syntax on Microsoft's website it says that it means it can't be changed in the shader.
Does it mean just that? That it can't be changed in the shader, but it's value may constantly be updated like in the C++ shader code through that c10 register? (I'm sorry, I don't know what you call it, so I'm calling it the c10 register, I know slightly more about GLSL than I do HLSL) Or does it mean it does not update at all?
Sorry for something that's probably a simple question, I just don't understand.