forge-instanced-rendering

Render many identical meshes with per-instance transforms via two vertex buffers.

36|6|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Nebulavenus/forge-gpu --skill forge-instanced-rendering-nebulavenus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: forge-instanced-rendering
Source: https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-instanced-rendering
Command: npx skills add https://github.com/Nebulavenus/forge-gpu --skill forge-instanced-rendering-nebulavenus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draw many copies of a mesh efficiently by using per-instance transforms streamed through a per-instance vertex buffer. One draw call renders all instances.

Core Features & Use Cases

  • Instanced rendering with two vertex buffers: per-vertex data and per-instance transform data.
  • HLSL/GLSL shader logic to reconstruct a model matrix on the GPU from per-instance columns.
  • Use cases include vegetation, crowds, particle systems, city blocks, or any scene with repeated geometry.

Quick Start

Upload an InstanceData array to a GPU buffer and bind it with the vertex buffer, then issue the instanced draw.

Frequently Asked Questions about forge-instanced-rendering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does instanced rendering reduce GPU draw calls for repeated meshes?▼

Instanced rendering reduces draw calls by streaming per-instance transforms through a dedicated vertex buffer, allowing the GPU to render many identical meshes in a single call. The shader reconstructs the model matrix on the GPU from per-instance columns.

How do I implement a two-buffer pipeline for instancing in SDL3?▼

To implement instancing, bind a per-vertex buffer and a per-instance buffer containing your InstanceData. Upload the instance transforms to the GPU, bind both buffers, and issue an instanced draw call to render all copies.

When should I use per-instance transforms for rendering geometry?▼

Use per-instance transforms for scenes with repeated geometry, such as forests, crowds, particle systems, or city blocks. It is ideal when you need to draw a single mesh multiple times with varying spatial transforms efficiently.

Do I need to reconstruct the model matrix on the GPU for instanced rendering?▼

Yes, reconstructing the model matrix on the GPU is required. The shader logic reads the per-instance columns from the instance buffer to build the transform matrix directly, eliminating the need to send pre-calculated matrices from the CPU.

What is the best way to render thousands of identical meshes efficiently?▼

The best way is using an instanced draw with a two-buffer pipeline. You define an InstanceData structure, upload an array of transforms to a GPU buffer, and issue a single draw call to render all instances with varying transforms.