webgpuRenderTargetWrapper.d.ts 1.3 KB

12345678910111213141516171819202122232425
  1. import type { TextureSize } from "../../Materials/Textures/textureCreationOptions";
  2. import type { WebGPUEngine } from "../webgpuEngine";
  3. import { RenderTargetWrapper } from "../renderTargetWrapper";
  4. import { WebGPUPerfCounter } from "./webgpuPerfCounter";
  5. /**
  6. * Specialized class used to store a render target of a WebGPU engine
  7. */
  8. export declare class WebGPURenderTargetWrapper extends RenderTargetWrapper {
  9. /** @internal */
  10. _defaultAttachments: number[];
  11. /**
  12. * Gets the GPU time spent rendering this render target in the last frame (in nanoseconds).
  13. * You have to enable the "timestamp-query" extension in the engine constructor options and set engine.enableGPUTimingMeasurements = true.
  14. */
  15. readonly gpuTimeInFrame?: WebGPUPerfCounter;
  16. /**
  17. * Initializes the render target wrapper
  18. * @param isMulti true if the wrapper is a multi render target
  19. * @param isCube true if the wrapper should render to a cube texture
  20. * @param size size of the render target (width/height/layers)
  21. * @param engine engine used to create the render target
  22. * @param label defines the label to use for the wrapper (for debugging purpose only)
  23. */
  24. constructor(isMulti: boolean, isCube: boolean, size: TextureSize, engine: WebGPUEngine, label?: string);
  25. }