Texture1D CreateXFilledTexture(int width, int bitDepth, TEXTURE_WRAP wrap) { Texture1D tex = new Texture1D(width, 2, bitDepth); tex.Wrap = wrap; for (int x = 0; x < width; x++) { tex.SetChannel(x, 0, x); } return(tex); }
Texture2D CreateXYFilledTexture(int width, int height, int bitDepth, TEXTURE_WRAP wrap) { Texture2D tex = new Texture2D(width, height, 2, bitDepth); tex.Wrap = wrap; for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { tex.SetChannel(x, y, 0, x); tex.SetChannel(x, y, 1, y); } } return(tex); }
Texture3D CreateXYZFilledTexture(int width, int height, int depth, int bitDepth, TEXTURE_WRAP wrap) { Texture3D tex = new Texture3D(width, height, depth, 3, bitDepth); tex.Wrap = wrap; for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { for (int z = 0; z < depth; z++) { tex.SetChannel(x, y, z, 0, x); tex.SetChannel(x, y, z, 1, y); tex.SetChannel(x, y, z, 2, z); } } } return(tex); }