float4x4 WVP;
texture cubeTexture;
sampler TextureSampler = sampler_state
{
texture = <cubeTexture>;
MipFilter = Point;
MagFilter = Point;
MinFilter = Point;
AddressU = Wrap;
AddressV = Wrap;
MaxAnisotropy = 16;
};
所以,如果我没有弄错,这告诉采样器状态我使用的纹理。 我对许多许多精灵都使用了一个效果文件,因此这允许我使用一个纹理(图集)。 我可以将我所有的纹理地图集合到一个大爸爸地图集中,但我担心这些并发症。更改HLSL中的纹理
有没有办法告诉像素着色器使用其参数使用特定的纹理? 我是HLSL的新手,对我很困惑。
你需要一个[Texture2dArray](https://msdn.microsoft.com/en-us/library/windows/desktop/bb509699(V = vs.85)的.aspx),选择那些。 –