forge-normal-maps

Apply tangent-space normal mapping to SDL GPU projects with TBN construction.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Extend 3D SDL GPU projects with per-pixel surface detail by adding tangent-space normal mapping, enabling richer visuals without increasing geometry.

Core Features & Use Cases

  • Extend vertex layout with tangent data and compute a TBN matrix in the vertex shader.
  • Sample and decode normal maps in the fragment shader to perturb normals per texel.
  • Use with models lacking tangents by optionally computing tangents on import.
  • Use Case: elevate a textured mesh to show fine surface details like bumps and grooves on characters or props.

Quick Start

Update the vertex format to include a vec4 tangent, implement TBN construction in the vertex shader, and sample a normal map in the fragment shader to influence lighting.

Frequently Asked Questions about forge-normal-maps

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

FAQPage Schema
How do I add tangent-space normal mapping to an SDL GPU project?▼

To add tangent-space normal mapping to an SDL GPU project, extend the vertex format with a vec4 tangent, construct a TBN matrix in the vertex shader, and sample a normal map in the fragment shader to perturb lighting per texel.

What is tangent-space normal mapping used for in 3D graphics?▼

Tangent-space normal mapping is used to increase per-pixel surface detail on textured 3D meshes without adding extra geometry. It enables richer visuals by simulating fine surface details like bumps and grooves during fragment lighting.

Can I apply normal mapping to models that do not have tangent data?▼

Yes, you can apply normal mapping to models lacking tangents by optionally computing the tangent data on import. This allows you to extend meshes without pre-existing tangent vectors to support the TBN construction workflow.

How do I construct a TBN matrix in a vertex shader for normal mapping?▼

You construct a TBN matrix in a vertex shader by using the vertex normal and a vec4 tangent from the extended vertex layout. This matrix transforms normal-map samples into the correct surface space for fragment lighting.

What vertex layout changes are required for tangent-space normal mapping?▼

Tangent-space normal mapping requires a vertex layout extension to include a vec4 tangent attribute. The fragment shader workflow also needs two textures and appropriate bindings to decode the normal map and apply surface lighting.