使用XNA 4可以在另一个着色器中包含着色器吗?我知道你可以在3.1之内做到这一点,但我似乎无法使这个工作?如果可以的话,任何指针都会很棒。包含着色器的着色器?
编辑
//---------------------------------------------------------------------------//
// Name : Rain.fx
// Desc : Rain particle effect using cylindrical billboards
// Author : Justin Stoecker. Copyright (C) 2008-2009.
//---------------------------------------------------------------------------//
#include "common.inc" // It's this line that causes me a problem
float4x4 matWorld;
float3 vVelocity;
float3 vOrigin; // min point of the cube area
float fWidth; // width of the weather region (x-axis)
float fHeight; // height of the weather region (y-axis)
float fLength; // length of the weather region (z-axis)
... Rest of file ...
的“common.inc”文件在有变数,但我想知道,如果你可以把方法在那里呢?
你能举一个XNA 3.1的例子吗? –
@Andrew Russell:更新的问题 –
你说这会导致你一个“问题” - 你能更具体吗?错误信息?另外值得指出的是:内容管道已更新为使用XNA 4.0中较新版本的着色器编译器。 –