Lighting post processing

From nlelouche/Unity-SkillForge · View interactive version

Lighting post processing is an AI agent skill from the GitHub repository nlelouche/Unity-SkillForge. Unity lighting and post-processing specialist for atmosphere, mood, and visual polish.

How to use this skill

Skill file

Lighting & Post-Processing

Overview

Unity lighting setup and post-processing effects for atmosphere, mood, and visual polish. Covers URP and HDRP Volume system.

When to Use

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    LIGHTING SETUP                           │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  DIRECT LIGHTS           INDIRECT LIGHT                    │
│  ┌──────────────┐       ┌──────────────┐                   │
│  │ Directional  │       │ Lightmaps    │ (Baked)          │
│  │ Point        │       │ Light Probes │ (Dynamic obj)    │
│  │ Spot         │       │ Reflection   │ (Specular)       │
│  │ Area (Baked) │       │ Probes       │                   │
│  └──────────────┘       └──────────────┘                   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│                  POST-PROCESSING STACK                      │
├─────────────────────────────────────────────────────────────┤
│  Volume (Global/Local) → Profile → Effects                  │
│  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐   │
│  │ Bloom  │ │ Color  │ │Vignette│ │ DOF    │ │ Motion │   │
│  │        │ │ Grade  │ │        │ │        │ │ Blur   │   │
│  └────────┘ └────────┘ └────────┘ └────────┘ └────────┘   │
└─────────────────────────────────────────────────────────────┘

Light Types

| Type | Use Case | Shadows |

|------|----------|:-------:|

| Directional | Sun, moon, main light | ✅ |

| Point | Lamps, fires, orbs | ✅ |

| Spot | Flashlights, spotlights | ✅ |

| Area | Soft room lighting | Baked only |

Post-Processing Effects

| Effect | Impact | Use |

|--------|:------:|-----|

| Bloom | Medium | Glow, HDR highlights |

| Color Grading | Low | Mood, LUT |

| Vignette | Low | Focus, atmosphere |

| Depth of Field | High | Focus effect |

| Motion Blur | High | Speed feeling |

| Ambient Occlusion | High | Contact shadows |

| Screen Space Reflections | High | Reflective surfaces |

Best Practices

Few-Shot Examples

Example 1: Sunset Mood

User: "Create a warm sunset atmosphere."

Agent:

Directional Light:
- Color: RGB(255, 180, 100)
- Intensity: 1.2
- Rotation: X=15 (low angle)

Volume Profile:
- Color Grading: Warm temperature +20
- Bloom: Intensity 0.5, Threshold 0.9
- Vignette: Intensity 0.3

Example 2: Horror Scene

User: "Dark, scary lighting setup."

Agent:

Lighting:
- Directional: Disabled or very dim
- Point lights: Cold blue, low intensity
- Spot: Harsh white for flashlight

Volume:
- Color Grading: Desaturated, lift shadows blue
- Vignette: 0.4 intensity
- Grain: Enable for film look
- Fog: Volumetric if HDRP

Example 3: Stylized Game

User: "Bright, colorful cartoon look."

Agent:

Lighting:
- Directional: White, Intensity 1.5
- Ambient: Bright gradient sky

Volume:
- No Bloom or subtle
- Color Grading: Boost saturation +10
- No Vignette
- Consider Tonemapping: Neutral

Pipeline Specific


TDD Contract

⚠️ Legacy Skill — Refactor Pending

Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.

// Escribe estos tests ANTES de implementar:

// Test 1: should [expected behavior] when [condition]
[Test]
public void LightingPostProcessing_Should{ExpectedBehavior}_When{Condition}()
{{
    // Arrange
    // TODO: Setup test fixtures
    
    // Act
    // TODO: Execute system under test
    
    // Assert
    Assert.Fail("Not implemented — write test first");
}}

// Test 2: should handle [edge case]
[Test]
public void LightingPostProcessing_ShouldHandle{EdgeCase}()
{{
    // Arrange
    // TODO: Setup edge case scenario
    
    // Act
    // TODO: Execute
    
    // Assert
    Assert.Fail("Not implemented");
}}

// Test 3: should throw when [invalid input]
[Test]
public void LightingPostProcessing_ShouldThrow_When{InvalidInput}()
{{
    // Arrange
    var invalidInput = default;
    
    // Act & Assert
    Assert.Throws<Exception>(() => {{ /* execute */ }});
}}

Pasos para completar el TDD:

  1. Descomenta los tests above
  2. Implementa la funcionalidad mínima para que compile
  3. Ejecuta los tests — deben fallar (RED)
  4. Implementa la funcionalidad real
  5. Verifica que los tests pasen (GREEN)
  6. Refactorea manteniendo los tests verdes

Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.