GPUTextureViewDescriptor constructor

GPUTextureViewDescriptor({
  1. String format,
  2. String dimension,
  3. String aspect,
  4. int baseMipLevel,
  5. int mipLevelCount,
  6. int baseArrayLayer,
  7. int arrayLayerCount,
  8. String label,
})

dimension is "2d" for one face or one layer and "cube" for a whole cube map; baseMipLevel with a mipLevelCount of one is a level to render into, and baseArrayLayer with an arrayLayerCount of one is a face to render into.

aspect is "all", "depth-only" or "stencil-only", and a depth-stencil texture bound for sampling needs one of the last two: a combined aspect cannot be sampled at all.

Implementation

external factory GPUTextureViewDescriptor({
  String format,
  String dimension,
  String aspect,
  int baseMipLevel,
  int mipLevelCount,
  int baseArrayLayer,
  int arrayLayerCount,
  String label,
});