airi/engines/stage-tamagotchi-godot/tests
Lilia_Chen 5b0568bbb4
Some checks are pending
CI / Check Provenance (push) Waiting to run
CI / Build Test (ui-transitions) (push) Waiting to run
CI / Unit Test (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build Test (stage-tamagotchi) (push) Waiting to run
CI / Build Test (stage-tamagotchi-godot) (push) Waiting to run
CI / Build Test (stage-web) (push) Waiting to run
CI / Build Test (ui-loading-screens) (push) Waiting to run
CI / Type Check (push) Waiting to run
Cloudflare Workers / Deploy - stage-web (push) Waiting to run
feat(stage-tamagotchi-godot): avatar glow NPR effect (#1951)
## Summary

This PR adds the current Stage Godot avatar presentation path:
avatar-only same-frame glow plus tuned toon color mapping.

<img width="994" height="951" alt="屏幕截图 2026-06-02 015159"
src="https://github.com/user-attachments/assets/feb94b95-745f-4b47-aba2-0289dafecd1c"
/>

<img width="1769" height="1279" alt="屏幕截图 2026-06-02 021212"
src="https://github.com/user-attachments/assets/d4437dc2-e859-42ca-b3fd-0a90e55d641b"
/>

## Design

The implementation uses three layers:

1. Base avatar material rendering still comes from the vendored V-Sekai
MToon shader.
2. `StageAvatarGlowRuntime` marks visible avatar meshes through a
depth-tested `MaterialOverlay` stencil pass.
3. `StageAvatarGlowCompositorEffect` reads that stencil mask in the same
frame, extracts avatar pixels, builds the glow pyramid, composites
glare, and applies the current NAES/toon color mapping.

This avoids Godot Environment Glow because that path is global. Here,
source selection needs to be avatar-specific and controlled by the stage
runtime.

It also avoids an extra SubViewport path because prior testing showed
camera-motion lag. The compositor path keeps the effect in the same
render frame.

## Stage Baseline

`StageVisualPreset` now keeps the stage environment neutral for this
effect:

- skybox is visible as background only
- skybox does not drive avatar/ground ambient light
- reflected light is disabled
- Godot Environment Glow is disabled
- Godot tonemap/adjustment stay neutral
- custom color mapping runs in the compositor

## Notes

`StageAvatarGlowCompositorEffect` currently owns both avatar glow and
toon color mapping. That is acceptable for this PR because it is the
only custom stage compositor today.

Before adding rim light, screen-space outlines, or more post effects,
compositor ownership should be split from individual features so effects
can register passes instead of replacing `Camera3D.Compositor`
independently.
2026-06-06 08:20:32 +08:00
..
material-rendering-check feat(stage-tamagotchi-godot): G1.3 default visual baseline (#1904) 2026-05-30 22:42:26 +08:00
StageTamagotchiGodot.Tests feat(stage-tamagotchi-godot): avatar glow NPR effect (#1951) 2026-06-06 08:20:32 +08:00