none
HLSL compiler problem

    質問

  • Hi, I want to preface this by saying I'm new to DirectX and I'm sure I'm doing something dumb. I built a DirectX Metro app using the template in Visual Studio, tweaking it to do what I'm interested in.  Now I need to integrate that into a XAML app.  I started a new C++ XAML project and moved much of the code from the first project into the second, making changes to support the XAML integration.  My problem is that my dummy SimplePixelShader.hlsl will no longer compile.  The error I'm getting is "invalid vs_2_0 output semantic 'SV_TARGET'".  I added these files to my project using Project->Add Existing Files. The pixel shader is the vanilla, 6 line file from the template.  Is there a special way I need to integrate the hlsl files into the XAML project that is tripping me up?  Thanks. 

    2012年4月13日 22:57

回答

  • The SimplePixelShader.hlsl needs to be compiled with the "ps" profile, not "vs". You are trying to compile the "pixel shader" as if it were a "vertex shader"

    • 回答としてマーク DerekMuk 2012年4月16日 20:51
    2012年4月14日 0:22

すべての返信