Vector3またはVector4の配列をピクセルシェーダーに渡す必要があります。CPUから設定してGPUでサンプリングできる1次元テクスチャのようなものはありますか?
1 に答える
0
いいえ、使用できる組み込みクラスはありませんが、独自のクラスを作成できます (テストされていません)。
public class Texture1D
{
GraphicsDevice device;
Vector4[] pixels;
bool mipMap = false;
SurfaceFormat Format;
public Texture1D (GraphicsDevice Device, int Length)
{
pixels = new Vector4[Length];
device = Device;
Format = SurfaceFormat.Color;
}
public Texture1D (GraphicsDevice Device, int Length, bool mipMap, SurfaceFormat format)
{
pixels = new Vector4[Length];
device = Device;
this.mipMap = mipMap;
Format = format;
}
}
于 2011-11-28T11:37:21.833 に答える