You set the Vertex shaders CBuffer only, but in your pixel shader, you have another CBuffer called PixelBuffer, which is never set but it is used (which I assume was meant to be filled with the pixelColor variable). you need to use PSSetConstantBuffers to bind the CBuffer for your pixel shader (or remove the CBuffer and pass it as a per instance parameter).
As for debugging, best way is to create a debug device while developing (and set the full verbose DX debug output) and have SysInternals' DbgView running in the background. It also requires you to be a bit more familiar with the API, and read the debug messages more carefully.
Show differencesHistory of post edits
#2Necrolis
Posted 11 July 2012 - 12:51 AM
You set the Vertex shaders CBuffer only, but in your pixel shader, you have another CBuffer called PixelBuffer, which is never set (which I assume was meant to be filled with the pixelColor variable). you need to use PSSetConstantBuffers to bind the CBuffer for your pixel shader (or remove the CBuffer and pass it as a per instance parameter).
As for debugging, best way is to create a debug device while developing (and set the full verbose DX debug output) and have SysInternals' DbgView running in the background. It also requires you to be a bit more familiar with the API, and read the debug messages more carefully.
As for debugging, best way is to create a debug device while developing (and set the full verbose DX debug output) and have SysInternals' DbgView running in the background. It also requires you to be a bit more familiar with the API, and read the debug messages more carefully.
#1Necrolis
Posted 11 July 2012 - 12:47 AM
You set the Vertex shaders CBuffer only, but in your pixel shader, you have another CBuffer called PixelBuffer, which is never set. you need to use PSSetConstantBuffers to bind the CBuffer for your pixel shader (or remove the color / pass it as a per instance parameter)