forge-decals

Project decals onto scene geometry with a three-pass depth-based pipeline.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317 --skill forge-decals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-decals
Source: https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317/tree/main/.claude/skills/forge-decals
Command: npx skills add https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317 --skill forge-decals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add deferred decal projection to an SDL GPU project. This skill enables projecting textures onto arbitrary scene geometry without UV mapping, using depth reconstruction and local-space bounds to create realistic bullet holes, scorch marks, and other surface details.

Core Features & Use Cases

  • Three-pass rendering architecture (shadow pass, scene pass, decal pass) to integrate decals with depth and lighting.
  • Depth texture usage with DEPTH_STENCIL_TARGET and SAMPLER for decal sampling.
  • Inverse view-projection reconstruction in the decal fragment shader to place decals in world space.
  • Local-space bounds rejection for efficient decal culling and accurate projection.
  • Procedural decal textures and soft-edge fading for realistic blend with scene geometry.
  • Normal G-buffer compatibility and Blinn-Phong lighting for decals, with shadow map sampling.
  • Render decals as unit cubes transformed by per-decal model matrices.

Quick Start

Configure a three-pass decal pipeline and render unit-cube decals using depth reconstruction and inverse view-projection in your SDL GPU project.

Frequently Asked Questions about forge-decals

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

FAQPage Schema
How do I project decals onto 3D surfaces in SDL GPU without UV mapping?

A three-pass decal pipeline in SDL GPU consists of a shadow pass, a scene pass, and a decal pass. It integrates decals with depth and lighting by using inverse view-projection reconstruction in the fragment shader to place them accurately in world space.

How do I render unit-cube decals using depth reconstruction in SDL GPU?

You render decals as unit cubes transformed by per-decal model matrices. The decal fragment shader uses inverse view-projection reconstruction and local-space bounds rejection to sample the depth texture and project the decal accurately onto the scene geometry.

Does SDL GPU decal rendering require specific depth texture configurations?

Yes, deferred decals support normal G-buffer compatibility and Blinn-Phong lighting, including shadow map sampling. This ensures that projected decals blend realistically with the scene's existing lighting and shadow conditions.

What are the limitations of using a three-pass decal pipeline for surface markings?

The three-pass decal pipeline requires inverse view-projection matrices, local-space bounds culling, and specific shader configurations for depth reconstruction. It is limited to scenarios where these inputs are available, relying heavily on accurate depth texture sampling for proper projection.