forge-gobo-spotlight

Add a projected-texture spotlight with cone falloff and shadow mapping to SDL GPU projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables real-time lighting in SDL GPU projects by providing a programmable spotlight that can project a texture (gobo) while casting depth-based shadows.

Core Features & Use Cases

  • Inner/outer cone angles for precise focus.
  • Projected gobo texture to create patterns on scene geometry.
  • Depth-based shadow map for directional shadows from the spotlight.
  • Single light matrix that drives shadow mapping, gobo projection, and cone masking.
  • Suitable for cinematic or stage-style lighting in SDL GPU-based applications.

Quick Start

Define spotlight parameters, compute the light VP, create the shadow map and a gobo texture, set up pipelines, and render a scene with shadow and gobo projection.

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 with a spotlight in SDL GPU?

To project a gobo texture in SDL GPU, you compute a light view-projection matrix to drive texture projection, cone masking, and shadow mapping onto scene geometry. You need to load a gobo texture as UNORM and configure proper samplers for the spotlight.

What is the best way to cast shadows from a projected spotlight in SDL?

Casting shadows from a projected spotlight in SDL requires a 2D shadow depth map using D32_FLOAT format. You render the scene depth from the light's perspective into this map, then sample it to occlude light and create depth-based shadows aligned with the gobo projection.

Does SDL GPU support inner and outer cone angles for theatrical spotlights?

Yes, SDL GPU supports inner and outer cone angles for precise spotlight focus. By applying cone falloff calculations in your shaders, you can create cinematic or stage-style lighting effects that blend smoothly between the inner and outer cone boundaries.

How does a single light matrix handle shadow mapping and gobo projection simultaneously?

A single light view-projection matrix handles shadow mapping, gobo projection, and cone masking by transforming vertex positions into the spotlight's clip space. This unified matrix ensures the projected texture, shadow depth lookup, and cone boundary falloff all align accurately.

What texture formats do I need for spotlight shadow mapping and pattern projection?

You need a D32_FLOAT 2D texture for the shadow depth map and a UNORM texture for the gobo pattern. These formats ensure accurate depth precision for shadow occlusion and correct color projection for the spotlight pattern on geometry.