setViewport

open external fun setViewport(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate, minDepth: Float, maxDepth: Float)(source)

The setViewport() method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates.

MDN Reference