Skip to content

fullScreenTriangle

const fullScreenTriangle: TgpuVertexFn<object, object>

A vertex function that defines a single full-screen triangle out of three points.

import { common } from 'typegpu';
const pipeline = root.createRenderPipeline({
vertex: common.fullScreenTriangle,
fragment: yourFragmentShader,
});
pipeline.draw(3);

packages/typegpu/src/common/fullScreenTriangle.ts:21