Loading...
Loading...
Use when setting up URP (or choosing URP vs HDRP), configuring URP assets and quality tiers for PC and phones, lighting a stylized or realistic Unity scene (sun, sky, baked or mixed lightmaps, Shadowmask, Adaptive Probe Volumes, reflection probes), or fixing blurry shadows, light leaks, gray bakes, washed-out images, tonemapping and grading, bloom too expensive on mobile, TAA, STP or MSAA choices, GPU Resident Drawer setup, shader warm-up hitches, or a custom shader that vanished or lost its baked light.
npx skill4agent add scenario-labs/skills scenario-unity-rendering-lightingnpx skills add scenario-labs/skills --skill <name>ut_runAgentCaptureAgentProfileut_reviewPassAudit| Decision | Default | Change when |
|---|---|---|
| Pipeline | URP 17.3 | HDRP only for PC/console needing its exclusive features; no new features, no mobile, web or Switch 1 (rps) |
| PC tier | Forward+, depth texture, MSAA 4x, HDR 32-bit, 2048 shadows over 60 m in 2 cascades, soft Medium, additional shadows, Distance Shadowmask (verified on Forward+), GPU Resident Drawer when draw calls bind the CPU | device tests |
| Mobile tier | Forward, no depth/opaque texture (the Opaque Texture also silently drops MSAA without StoreAndResolve), MSAA 2x, render scale 0.85, 1024 shadows over 30 m, 1 cascade, soft off, no additional shadows, Shadowmask mode, bias 0.1 / 0.5 (template 1 / 1 leaked) | a wide device spread: add a low tier with |
| Post per tier | one Grading Mode (HDR) and LUT 32 everywhere; Mobile profile: bloom Kawase or Dual (6.3), no HQ filtering, Half or Quarter, at most 5 iterations, no DoF, no SSAO, Leak Reduction Performance; PC: SSAO Downsample, Leak Reduction Quality | art direction |
| GI | Static geometry lightmapped with a Mixed sun (Shadowmask where a phone tier bakes static sun shadows, else Baked Indirect); APV for dynamic objects; open or changing layouts: APV only | Subtractive for low-end stylized (CC [00:41:17]); APV scenarios or sky occlusion for time of day |
| Probes | Adaptive Probe Volumes | Light Probe Groups without compute or when probes must move (APV24 [00:08:31]) |
| AA | PC MSAA 4x or TAA/STP; mobile MSAA 2x or FXAA | TAA/STP never with MSAA, stacking or dynamic resolution; STP not on GLES |
ut_run.run_method(P, "AgentKit.Lighting....", args, graphics=True)-nographicsBakeL.raw_commandUnity -batchmode -nographics -quit -projectPath P -logFile <job>/unity.log -executeMethod <method> -agentJob <job><job>/args.jsonAGENT_RESULTreferences/procedures.mdLightingPipeline.ReportPipelineConfigureTiersasset_propsrenderer_propsquality_propsrenderer_featuresvolume_profilevolume_overridesgraphicsL.tier_checkAgentView_*CaptureStageL.stage_reviewI * 2^-EV(card)LightingAudit.AuditLightingstyle: "stylized"LightingBake.Bakeapv_layersAgentProfileut_stat.budget_checkPassAudit| Value | Relative to | Source |
|---|---|---|
| EV100 14 sun, 10 overcast, 8 sunset, 6 bright interior, 1 dark interior | real-world anchors; URP has no EV, use ratios | PYD [00:17:37] |
| 51 vs 102 texels/m | 2048 over 40 m vs 1024 over 10 m | 6.3 Manual |
| spot 1, point 6, max 16 maps | additional-light shadow atlas | 6.3 Manual |
| 256 samples; 4 lights per texel | denoiser floor; shadowmask channels | 6.3 Manual |
| 0.2 background, 1 play area | Scale In Lightmap | CC [00:17:30] |
| 0.20 vs 0.67 to 0.83 ms; 42.7 vs 14.5 MB | lightmaps vs APV sampling (PS4 1080p); memory | APV24 |
| 1,723 / 9 / 0 / 0 px | sun leak on Mobile: template bias, 0.1 / 0.5, Shadowmask, Subtractive | observed |
| 1.33 vs 0.67 MB | interior lightmap set, Shadowmask vs Subtractive (512 x 512) | observed |
| about 2,450 to 22 to 38 draw calls; main thread / 3 | 900 cubes, GRD off vs on, Editor Play mode | observed |
| 6 / 8 / 7 native passes | Mobile: depth off / copy After Opaques / After Transparents | observed |
| 14 PSOs, warmed in 5 frames | outdoor scene, Metal development player, 3 per frame | observed |
| 1 to 2 ms per full-screen pass | Quest 2-class tiler | RK [00:14:30] |
budget_checkreferences/critique.md| Mistake | What it looks like | Fix |
|---|---|---|
| Lights by feel, exposure to rescue them | card +0.9 EV, interiors never balance | gray card, fixed exposure, solve lights |
| Resolution raised instead of distance lowered | 4096 still soft near the camera | Max Distance to the last visible dynamic shadow |
CPU lightmapper or | refused, or nothing baked | GPU lightmapper, |
| Small props with Contribute GI off | no baked contact shadow; realtime shadows under Shadowmask | Contribute GI on, Receive GI = Light Probes |
| More than 4 shadowed Mixed lights on one surface | extra lights frozen as fully baked | |
| Toon or custom shader on lightmapped geometry | baked light and shadows gone | |
| Per-tier bloom set in the scene volume | Mobile keeps PC bloom cost | cost fields only on tier profiles |
| One tier LDR, one HDR | tiers drift apart after grading | one Grading Mode (HDR), one LUT size |
| APV masks without Use Rendering Layers | masks ignored on that tier | |
| No local reflection probe indoors | chrome and wood reflect sky | box probe per zone, importance 2 |
| Depth Priming on with custom shaders | objects vanish once MSAA is off | DepthOnly and DepthNormals passes, or priming Disabled |
| Template Mobile bias 1 / 1 on thin walls | sawtooth sun along the wall-ceiling joint | bias 0.1 / 0.5; bake the sun (Shadowmask or Subtractive) |
| GRD on without its chain | nothing batches | BRG Variants Keep All, SRP Batcher, Forward+, static batching off |
_CLUSTER_LIGHT_LOOP_FORWARD_PLUSPassAuditavailable: falsefilterGraphicsStateCollectionAPVLeakReductionMode.ValidityBasedToString()references/procedures.mdreferences/critique.mdreferences/expert-notes.mdreferences/gui-paths.mdreferences/sources.mdscripts/ut_lighting.pyscripts/AgentKit/Lighting/*.csscripts/Runtime/*.cs