forge-gobo-spotlight

Implements projected-texture spotlight with cone falloff and shadow mapping for SDL GPU scenes.

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-gobo-spotlight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-gobo-spotlight
Source: https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317/tree/main/.claude/skills/forge-gobo-spotlight
Command: npx skills add https://github.com/code-review-benchmark/coderabbit_prs2__forge-gpu__coderabbit__PR323__20260317 --skill forge-gobo-spotlight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add a projected-texture spotlight with cone falloff, shadow map, and pattern projection to an SDL GPU project. The approach enables cinematic lighting by combining gobo projection with depth-based shadows using a single light_vp matrix.

Core Features & Use Cases

  • Gobo projection: project a texture through the light to create patterns on the scene.
  • Cone falloff and shadows: inner/outer cone angles with depth-based shadow mapping for realism.
  • Triple-duty matrix: a single light_vp drives shadow mapping, gobo UV projection, and cone masking in the scene.

Quick Start

Integrate forge-gobo-spotlight by initializing the light position and target, loading a gobo texture, creating a 2D shadow map, and wiring the light_vp into your scene render.

Frequently Asked Questions about forge-gobo-spotlight

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

FAQPage Schema
How do I project a gobo texture through a spotlight in an SDL GPU scene?

You project a gobo texture by loading the texture into a sampler and wiring a single light_vp matrix to handle UV projection, cone masking, and shadow mapping simultaneously in your SDL GPU scene.

What is the best way to add cone falloff and shadow mapping to SDL GPU lighting?

The best way to add cone falloff and shadow mapping is to use a single light_vp matrix that drives inner and outer cone angles alongside a 2D shadow depth texture for realistic depth-based shadows.

How does a single light_vp matrix handle shadow mapping, gobo projection, and cone masking?

A single light_vp matrix performs triple duty by calculating depth-based shadows, projecting gobo texture UVs, and masking the inner and outer cone falloff angles within the same rendering pass.

Do I need a separate depth texture to generate realistic shadows with projected spotlights?

Yes, you need a dedicated 2D shadow depth texture paired with appropriate samplers to generate realistic depth-based shadows when using projected-texture spotlights in your graphics pipeline.

Can I use projected texture spotlights without setting up a separate shadow map pass?

No, achieving realistic shadows requires a shadow depth texture and appropriate samplers, because the light_vp matrix relies on this depth data to compute shadow mapping alongside gobo projection.