this is my vertex shader,
struct WorldViewProjection
{
matrix WVP;
};
ConstantBuffer<WorldViewProjection> WorldViewProjectionCB : register(b0);
struct PSInput
{
float4 position : SV_POSITION;
float3 uvw : TEXCOORD;
};
PSInput main(float4 position : POSITION, float3 uvw : TEXCOORD)
{
PSInput result;
result.position = position;
result.uvw = uvw;
return result;
}
when i try to compile it with in visual studiuo 2017 i get this error…
Severity Code Description Project File Line Suppression State
Error X3000 unrecognized identifier 'ConstantBuffer' ********vertexshader_volume.hlsl 6
i am correctly setting
shader type to /vs
shader model 5_0
but when i try to compile it with D3DcompileFromFile it works...
why i m not able to get a precompiled cso object....