/** * The WebGPU mesh batcher — textured triangle meshes with the same * geometry contract as the WebGL `MeshBatcher` (36-byte unlit layout, * model-space retained geometry, uniform-driven placement) realized on * this backend's recording model: * * - mesh mode is PIPELINE state, not device state: every mesh flush looks * its pipeline up with the mesh axes (depth write + LEQUAL, per-mesh * cull/frontFace from `renderer.drawMesh`) and blend forced "none" — * there is no `bind()`/`unbind()` state to own, and the depth clear is * the pass's `depthLoadOp` (see `resolveDepthOps`), not a draw-time op * - placement/tint/cutoff/emissive ride ONE per-draw uniform snapshot * (group 3, dynamic offset into the effect uniform arena) — the * queue-write law: a shared region would be retroactively clobbered for * draws already recorded this frame * - the accumulated path chunks through the shared versioned-remap dedup * (`gpu/meshchunk.ts`) into the frame's vertex arena plus a per-frame * INDEX arena (`renderer.indexArena`) — one `drawIndexed` per chunk * @augments WebGPUBatcher * @category Rendering */ export default class WebGPUMeshBatcher extends WebGPUBatcher { /** * @param {import("../webgpu_renderer.js").default} renderer - the owning renderer * @override */ override init(renderer: import("../webgpu_renderer.js").default, settings: any): void; meshLayout: GPUBindGroupLayout | undefined; vertexLayoutKey: string | undefined; customShader: any; hostedEffect: any; indexData: Uint32Array | undefined; indexCount: any; currentMaterial: any; uniformBinding: { bindGroup: GPUBindGroup; offsets: number[]; } | { bindGroup: any; offsets: any[]; } | null | undefined; uniformBindGroups: Map | undefined; effectBindGroups: Map | undefined; meshState: { cullMode: string; frontFace: string; } | undefined; retained: Map | undefined; instanced: Map | undefined; instancedKeys: Map | undefined; shadowFamilyKeys: Map | undefined; instancedShaderWarned: boolean | undefined; /** * Add a textured mesh to the batch (the accumulated path: vertices * already CPU-projected, identity model matrix). Chunks triangles * across flushes through the shared versioned-remap dedup, exactly * like the WebGL batcher. Multi-material vertex colors ride `aColor`; * the runtime tint stays a uniform. * @param {object} mesh - a Mesh with vertices, uvs, indices, texture * @param {number} tint - tint color in UINT32 (argb) format */ addMesh(mesh: object, tint: number): void; /** * Record the pending mesh vertices as one indexed draw: vertex bytes * into the vertex arena, index bytes into the index arena, pipeline * from the mesh family with the depth/cull axes and blend forced * "none" (the GL mesh mode disables BLEND). * @override */ override flush(): void; } import WebGPUBatcher from "./webgpu_batcher.js"; import WebGPUInstanceBuffer from "../buffer/instance_buffer.js"; import { Matrix3d } from "../../../math/matrix3d.ts"; import WebGPURetainedGeometry from "../buffer/retained_geometry.js"; //# sourceMappingURL=mesh_batcher.d.ts.map