get a variable value from a shader
get a variable value from a shader
How can I get the value of a variable from an hlsl shader to debug it?
You can't. Or at least, not directly, i think! i am not sure if there are Shader Debuggers able to extract HLSL variables.
If you need to know the value of a variable, you have to "render" it to a rendertarget, lock the texture after rendering it and read the pixels.
If you need to know the value of a variable, you have to "render" it to a rendertarget, lock the texture after rendering it and read the pixels.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt