this being my first question, please provide me with a little mercy. I am currently working with the following bits of shader code in the Pixel Shader:
struct PixelShaderInput
{
float4 pos : SV_POSITION;
};
float4 main(PixelShaderInput input) : SV_TARGET
{
return float4(0.1f, 0.1f, 0.1f, 1.0f);
}
In the Vertex Shader:
cbuffer ModelViewProjectionConstantBuffer : register(b0)
{
matrix model;
matrix view;
matrix projection;
};
struct VertexShaderInput
{
float3 pos : POSITION;
};
struct PixelShaderInput
{
float4 pos : SV_POSITION;
};
PixelShaderInput main(VertexShaderInput input)
{
PixelShaderInput output;
float4 pos = float4(input.pos, 1.0f);
pos = mul(pos, model);
pos = mul(pos, view);
pos = mul(pos, projection);
output.pos = pos;
return output;
}
Now comes the odd part. On my Virtual machine without DirectX11 support, this version of the code works if i copy the above shader code to the two files created by the project skeleton:
void SUS3DApp1Main::SUSCreateDeviceResources()
{
//auto loadVSTask = DX::ReadDataAsync(L"SUSPixelShader.cso");
//auto loadPSTask = DX::ReadDataAsync(L"SUSVertexShader.cso");
// Load shaders asynchronously.
//this version works
auto loadVSTask = DX::ReadDataAsync(L"SampleVertexShader.cso");
auto loadPSTask = DX::ReadDataAsync(L"SamplePixelShader.cso");
While this one does not:
void SUS3DApp1Main::SUSCreateDeviceResources()
{
auto loadVSTask = DX::ReadDataAsync(L"SUSPixelShader.cso");
auto loadPSTask = DX::ReadDataAsync(L"SUSVertexShader.cso");
I checked and rechecked the compile settings in Visual Studio, but they look the same to me. Does anyone of you know what is different in the "special" files which were created during the creation of the project skeleton?