UNPKG

typegpu

Version:

A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.

10 lines (9 loc) 641 B
import type { AnyVertexAttribs, TgpuVertexAttrib } from '../../shared/vertexFormat.ts'; import type { TgpuVertexFn } from '../function/tgpuVertexFn.ts'; import type { INTERNAL_TgpuVertexAttrib, TgpuVertexLayout } from './vertexLayout.ts'; export interface ConnectAttributesToShaderResult { usedVertexLayouts: TgpuVertexLayout[]; bufferDefinitions: GPUVertexBufferLayout[]; } export declare function isAttribute(value: unknown): value is TgpuVertexAttrib & INTERNAL_TgpuVertexAttrib; export declare function connectAttributesToShader(shaderInputLayout: TgpuVertexFn.In, attributes: AnyVertexAttribs): ConnectAttributesToShaderResult;