none
Visual Studio 2013 + DirectX 开发商店应用,像素着色器问题 RRS feed

  • 问题

  • 我自定义了一些数据结构和计算方法,名为Light.hlsli。然后在SamplePixelShader.hlsl中添加引用。#include “Light.hlsli”。然后就出现如下错误:error X1507: failed to open source file: 'LightBase.hlsli'。请问如何解决
    2014年3月3日 13:57

答案

  • Hi,

    我不太了解DirectX编程。在windows store app中,.hlsli文件经VS编译后应该会变成.cso文件。当你打开或者load .hlsli文件时,您应该不是以dll的形式使用它,您应该将它包含在AppX Package里面,具体您可以参考:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/69f17e7e-fccf-4b7b-9d31-d9af6e231a12/trouble-loading-a-shader-file?forum=wingameswithdirectx

    祝您好运!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年3月4日 3:41
    版主