Problem with shader include file

Last post 05-08-2008, 12:26 PM by Hetraq. 2 replies.
Sort Posts: Previous Next
  •  05-07-2008, 9:16 AM

    Problem with shader include file

    Hi!
    I'm currently playing with some shader rendering and found a 2D lightning shader I wanted to try. I added the shader to my project and also an extra file which the shader included (called Quad.fxh).
    Now when I build the project I have a compile error which say that there's no support for this "Quad.fxh".
    Can I circumvent this problem without having to write my own content processor?

    Thanks.

  •  05-07-2008, 11:54 AM

    Re: Problem with shader include file

    The problem is that the pipeline doesn't know what to do with a .fxh file. You don't want to build this directly (it's just included by your main effect) but when you add it to the project, the pipeline thinks you're asking it to build this file, and it doesn't recognize the extension.

    Either just don't add this file to your project, or add it but then change the build action property from Compile to None.

    --
    XNA Framework Developer
    blog - homepage
  •  05-08-2008, 12:26 PM

    Re: Problem with shader include file

    Yes, that was it.
    I tried to change the build action to none before but I didn't realize that you had to change the actual include path in the shader file.
    Sorry, but I'm quite new to shaders. :)

View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback