:Release Notes: - Agents files for opencode and claude - Skills for opencode and claude - 3d models with medical organs - Some textures :Detailed Notes: - :Testing Performed: - :QA Notes: - Looks like shit :) :Issues Addressed: TG-1
108 lines
9.2 KiB
Markdown
108 lines
9.2 KiB
Markdown
---
|
||
name: urp-render-pipeline
|
||
description: URP 14.0.11-specific render-pipeline work in the LaparoscopicSurgeryEmulation scene. Use when adjusting URP assets, Volume profile overrides (Bloom, Vignette, DepthOfField, Tonemapping, etc.), reflection probes, color space, exposure, fog, skybox, or post-processing on this project. Translates HDRP-flavoured requests into URP-safe operations.
|
||
---
|
||
|
||
# URP Render Pipeline (project-scoped)
|
||
|
||
This project runs **URP 14.0.11** on Unity 2022.3.25f1. Any request that mentions HDRP-specific features (ray-traced reflections, planar reflection probes, path tracer, physical-camera exposure) must be translated to URP equivalents before execution. Default URP asset for this project is one of `URP-Balanced.asset`, `URP-HighFidelity.asset`, or `URP-Performant.asset` (in `Assets/Settings/`) — confirm which one is the scene's `RenderPipelineAsset` before changing it.
|
||
|
||
## When to load
|
||
|
||
Load when the agent is about to:
|
||
- Touch any `URP-*.asset` or `URP-*-Renderer.asset`.
|
||
- Add or modify a Volume, Volume Profile, or Volume override.
|
||
- Adjust reflection probes, lightmaps, light probe groups, or environment lighting.
|
||
- Change color space, HDR enable state, MSAA, or post-processing toggles.
|
||
- Bake lighting, light probes, or reflection probes.
|
||
- Diagnose "scene looks flat" or "scene looks washed out" reports.
|
||
|
||
## URP assets inventory (do not move)
|
||
|
||
- `Assets/Settings/URP-Balanced.asset` + `URP-Balanced-Renderer.asset`
|
||
- `Assets/Settings/URP-HighFidelity.asset` + `URP-HighFidelity-Renderer.asset`
|
||
- `Assets/Settings/URP-Performant.asset` + `URP-Performant-Renderer.asset`
|
||
- `Assets/Settings/SampleSceneProfile.asset` — the **Volume profile** (post-processing overrides live here)
|
||
- `Assets/Settings/TexturesSettings.asset` — texture import / quality settings
|
||
|
||
Confirm which URP asset is current before changing it:
|
||
|
||
```
|
||
manage_graphics(action="pipeline_get_info")
|
||
manage_scene(action="get_active")
|
||
```
|
||
|
||
If the active scene's quality setting references a different URP asset, call it out in the handoff and ask before swapping.
|
||
|
||
## Translating HDRP concepts to URP
|
||
|
||
| HDRP concept | URP equivalent | Notes |
|
||
|---|---|---|
|
||
| HDRP Volume with `Bloom`, `Vignette`, `ChromaticAberration`, `DepthOfField`, `MotionBlur`, `FilmGrain`, `Tonemapping`, `ColorAdjustments`, `LensDistortion`, `PaniniProjection` | URP Volume with the same override types (URP package provides them) | Use `manage_graphics(action="volume_set_effect", effect="<Name>")` |
|
||
| `Exposure` in EV (physical) | `ColorAdjustments.postExposure` (in stops, not EV) | Keep range conservative (e.g., -1.0 to +1.0 stops) |
|
||
| `Sky and Fog Volume` for fog | URP `Volume` with a `Fog`-style override is **not** first-class; use `RenderSettings.fog` + URP-compatible setup, or a custom Volume override | URP fog is limited; document the limitation in the handoff |
|
||
| HDRP `ReflectionProbe` (refresh mode = Every Frame) | URP `ReflectionProbe` with `Refresh Mode = Via Scripting` (or `On Awake` for static) | Document when re-bake is needed |
|
||
| HDRP `PlanarReflectionProbe` | Not available in URP 14.0.11 by default; use a `ReflectionProbe` or render feature | If a real planar reflection is required, propose a render feature and ask for approval |
|
||
| HDRP `DecalProjector` | URP `DecalProjector` (from `com.unity.render-pipelines.universal`) | Both packages ship decals; behaviour differs slightly — verify in-scene |
|
||
| HDRP ray-traced reflections / path tracer | Not available in URP | Refuse; suggest baked reflection probe + roughness modulation instead |
|
||
| HDRP light cookies via area lights | URP supports light cookies for directional / spot / point lights | Use a baked or runtime-generated cookie texture |
|
||
|
||
## Volume profile: how to add / edit overrides
|
||
|
||
1. Locate the active Volume profile with `manage_graphics(action="volume_get_info")` or by reading `SampleSceneProfile.asset`. If there is no profile, create one in `Assets/Settings/LaparoscopicBenchmark/` (bounded folder creation).
|
||
2. Add a Volume override only when the existing profile lacks it:
|
||
- `manage_graphics(action="volume_add_effect", profile_path="Assets/Settings/SampleSceneProfile.asset", effect="Bloom")` — or whichever override is needed.
|
||
3. Set parameters on the override:
|
||
- `manage_graphics(action="volume_set_effect", effect="Bloom", parameters={"threshold": 1.0, "intensity": 0.25, "scatter": 0.7})` (example values; treat as placeholders, verify against current state).
|
||
4. Override names to expect in URP 14: `Bloom`, `Vignette`, `ChromaticAberration`, `DepthOfField`, `MotionBlur`, `PaniniProjection`, `LensDistortion`, `FilmGrain`, `Tonemapping`, `ColorAdjustments`, `LiftGammaGain`, `ChannelMixer`, `ShadowsMidtonesHighlights`, `SplitToning`, `WhiteBalance`, `HDROverrides`. URP-specific: `ScreenSpaceAmbientOcclusion` (URP SSAO renderer feature), `ScreenSpaceShadows` (URP shadow cascade quality).
|
||
|
||
A laparoscope-friendly starting profile is conservative: low `Bloom.intensity` (0.1–0.3), tight `Vignette.intensity` (0.2–0.4), moderate `DepthOfField` focused on 0.05–0.5 m, `Tonemapping` set to Neutral or ACES, `ColorAdjustments.postExposure` near 0, `ColorAdjustments.contrast` slightly positive (0.05–0.15). Verify each value by visual inspection, not by assumption.
|
||
|
||
## Reflection probes for the cavity
|
||
|
||
The laparoscope sees a small concave cavity with wet specular highlights. A single well-placed `ReflectionProbe` per `CavitySlot` is enough; HDRP's "Refresh = Every Frame" is **not** available in URP, so:
|
||
|
||
- For static cavities: `Refresh Mode = On Awake` (re-bake on enable).
|
||
- For slowly-changing cavities: `Refresh Mode = Via Scripting` and trigger a `RenderProbe` call when an instrument moves (only with explicit approval, because it adds a per-frame dependency).
|
||
- For dynamic per-frame updates: refuse unless a URP render feature or `CommandBuffer` solution has been bounded and approved.
|
||
|
||
`Cubemap capture size`: 256 is a reasonable starting point for cavity work; 128 for performance-bound scenarios; 512 only for hero shots.
|
||
|
||
## Color space and HDR
|
||
|
||
- The project is most likely Linear color space (URP default in 2022.3 LTS). Confirm with `manage_graphics(action="pipeline_get_info")`. Switching color space requires an Editor restart and re-bake of lighting — do not do it casually.
|
||
- `HDR` should be enabled on the camera for any post-processing chain that includes `Bloom` or `Tonemapping`. Check via `manage_camera(action="set_lens", ...)` is not the right tool — use the camera's `allowHDR` flag through `manage_components` or by reading the camera component first.
|
||
|
||
## Renderer features
|
||
|
||
- This project may have a custom `DepthRenderPassFeature` (under `Assets/Scripts/DepthRenderPassFeature.cs`). Renderer features on `URP-*-Renderer.asset` are how the project's depth pass is wired. Adding a new feature requires editing the renderer asset — bounded change, document the addition in the handoff.
|
||
- If a new renderer feature is needed (e.g., a custom SSAO override, a custom post-process pass), prefer adding it to the renderer asset only after the Lighting/Rendering agent has produced a one-sentence bounded change statement.
|
||
|
||
## Fog
|
||
|
||
URP's built-in fog is limited. The two practical options:
|
||
- Enable Unity's legacy `RenderSettings.fog` and let URP render it. Document that URP does not have HDRP's volumetric fog; for cavity haze use a custom particle system or a low-cost `ParticleSystem` with additive blending.
|
||
- If true volumetric fog is required, refuse unless the user explicitly accepts the cost of a render feature or a third-party package.
|
||
|
||
## Baking
|
||
|
||
- `bake_start` and `bake_status` are the right MCP calls for lighting bakes.
|
||
- `bake_clear` and `bake_get_settings` / `bake_set_settings` are read/clear primitives.
|
||
- Bake **after** any change to static geometry, materials with emission/occlusion, or light positions. The cavity is small enough that a fast bake is fine; do not run a "Production" quality bake unless the user asks.
|
||
|
||
## Common bounded changes (templates)
|
||
|
||
1. **Add Bloom to the Volume profile**: locate profile → `volume_add_effect` with `effect="Bloom"` → `volume_set_effect` with conservative `intensity`/`threshold`. Verify with screenshot.
|
||
2. **Tighten vignette for the laparoscope look**: `volume_set_effect(effect="Vignette", parameters={"intensity": 0.3, "smoothness": 0.4})`. Verify.
|
||
3. **Switch the active URP asset to HighFidelity for the cavity scenario**: confirm quality setting → `pipeline_set_settings` (if supported) or write a bounded change in the handoff. **This is destructive of performance budget; ask first.**
|
||
4. **Place a reflection probe inside the cavity**: `manage_gameobject(action="create", name="CavityReflectionProbe", parent="CavitySlot", components_to_add=["ReflectionProbe"])` → set `resolution=256`, `clearFlags=Skybox` (or `SolidColor` if the cavity is enclosed), `mode=Realtime` (or `Baked`). Bake if Baked.
|
||
|
||
## Anti-patterns to refuse
|
||
|
||
- Enabling ray-traced reflections, path tracer, or any HDRP-only feature.
|
||
- Switching color space without explicit approval.
|
||
- Adding a new URP asset when one of the three existing assets already fits the scenario.
|
||
- Disabling MSAA, HDR, or post-processing globally — these are per-camera or per-renderer toggles.
|
||
- Bumping `RenderScale` above 1.5 to "fix" softness — that is a performance landmine, propose a different fix.
|
||
- Adding a renderer feature that has not been bounded in a one-sentence change statement.
|