Function createTextureWithRandomDataAndGetTexels
- createTextureWithRandomDataAndGetTexels(t, descriptor, options?): Promise<{
texels: TexelView[];
texture: GPUTexture;
}> Parameters
descriptor: GPUTextureDescriptor
Optional
options: RandomTextureOptions
Returns Promise<{
texels: TexelView[];
texture: GPUTexture;
}>
Fills a texture with random data and returns that data as an array of TexelView.
For compressed textures the texture is filled with random bytes and then read back from the GPU by sampling so the GPU decompressed the texture.
For uncompressed textures the TexelViews are generated and then copied to the texture.