HLSL error X3086: DX9-style 'compile' syntax is deprecated in strict mode
Hey, I get this error:
error X3086: DX9-style 'compile' syntax is deprecated in strict mode When compiling a directx effect with this code:hr=D3DX11CompileFromFile( TEXT("shaders\\basic.fx"), NULL, NULL, NULL,"fx_5_0", D3DCOMPILE_ENABLE_STRICTNESS, 0, NULL, &pBlob, &pEr开发者_如何学JAVArorBlob, NULL );
I'm pretty sure it's complaining about this:
technique11 basic
{
pass p0
{
VertexShader = compile vs_5_0 vsMain();
PixelShader = compile ps_5_0 psMain();
}
}
So what am I supposed to use instead of compile?
Try:
technique11 basic
{
pass p0
{
SetVertexShader( CompileShader( vs_5_0, vsMain() ) );
SetPixelShader( CompileShader( ps_5_0, psMain() ) );
}
}
精彩评论