forge-indirect-drawing

Generate GPU-driven indirect draw commands with compute-based frustum culling.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GPU-driven rendering decides visibility on the GPU, reducing CPU draw calls and improving performance for large scenes.

Core Features & Use Cases

  • Compute-based frustum culling: a compute shader tests bounding spheres against six frustum planes and writes indirect draw commands.
  • Indirect drawing: the GPU generates draw commands that the render Pass consumes, eliminating per-object CPU draw decisions.
  • Portable instance addressing: uses a storage buffer and an instance-ID mechanism to map per-object data to shaders across backends.
  • Live use case: render hundreds or thousands of instances with minimal CPU overhead and dynamic visibility.

Quick Start

Enable the compute pass, bind object data as a storage buffer, bind a mesh and an instance-ID resource, run the compute shader to generate indirect draw commands, then execute an indirect draw.

Frequently Asked Questions about forge-indirect-drawing

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

FAQPage Schema
How do I use compute shaders for frustum culling and indirect drawing?

GPU-driven frustum culling uses a compute shader to test instance bounding spheres against six frustum planes and write indirect draw commands to a storage buffer, eliminating per-object CPU draw decisions for large scenes.

What is GPU-driven rendering and when do I need indirect draw commands?

GPU-driven rendering decides instance visibility on the GPU to reduce CPU draw calls. You need indirect draw commands when rendering hundreds or thousands of instances with dynamic visibility and minimal CPU overhead.

How do I bind per-object data to a vertex shader for indirect drawing?

You bind per-object data using a storage buffer of ObjectGPUData and a portable instance-ID mechanism, mapping object-specific attributes to the vertex shader across different rendering backends during the indirect draw.

Does this frustum culling approach work with SDL GPU pipelines?

Yes, the frustum culling compute shader and indirect drawing workflow are designed for SDL GPU pipelines, utilizing Vulkan-style frustum plane extraction to generate and consume indirect draw commands.

Why use a storage buffer for indirect commands instead of CPU draw calls?

Using a storage buffer for indirect commands allows the GPU to generate draw commands directly after compute-based frustum culling, significantly reducing CPU overhead when rendering large numbers of instances.