Loading...
Loading...
Use when a Unity 6.3 URP task involves shaders: hand-written HLSL, Shader Graph water, toon, dissolve or outline, Custom Function nodes, a renderer feature or full-screen effect on Render Graph, compute shaders, shader variants, keywords, stripping, Shader Build Settings, PSO warm-up, or shader cost; or when a material turns pink or invisible, casts no shadow, ignores extra lights under Forward+, an effect 'does nothing', the game stutters the first time something appears, or builds bloat with variants.
npx skill4agent add scenario-labs/skills scenario-unity-shaders.hlslreferences/gui-paths.mdnpx skills add scenario-labs/skills --skill <name>ut_envut_runut_reviewtests/code/unity-shaders/run_all.sh --livearchive/tests/unity-shaders/AgentPasses.hlsl.hlsl#define _ALPHATEST_ON 1UniversalTarget.csclip()normal * 0.5 + 0.5Lit.shaderut_shaders.urp_lit_keywords()_CLUSTER_LIGHT_LOOPLIGHT_LOOP_BEGINshader_featuremulti_compiledynamic_branchif#ifshader_feature_localdynamic_branch#ifGraphicsStateCollectionShader.CreateGPUProgramsinhalffloatRecordRenderGraphresourceData.cameraColor = destinationAddRenderPassesMobile_RPAsset.hlslMeshRendererSkinnedMeshRenderer.SetShaderUserValueMaterialPropertyBlockAssets/AgentShaders/ut_shaders.install(P)RendererFeatureJobs.ListFeatureslint_shader_fileshadergraph_summarylint_project_keywordsscripts/Shaders/AgentLitAgentToonAgentWaterAgentDissolveAgentEdgeOutlineAgentGrayscaleAgentComputeAgentPasses.hlslAGENT_CLIPAGENT_DISPLACEAgentNoise.hlslShaderGraphJobs.ImportPackageSampleDuplicateGraphshadergraph_set_target_settingsGeneratedCodeAgentCustomLighting.hlslShaderJobs.ValidateShadersShaderUtil.GetShaderMessagesCompileVariantSetupMaterialsShaderLab.BuildSceneShaderLab.Shotsut_reviewRendererFeatureJobs.AddFeatureAgentFullscreenFeatureFullScreenPassRendererFeatureVariantJobs.StrippingSettingsBuildShaderBundleparse_variant_funnelvariant_budget_checkKeywordOverridesPostProcessingAuditPsoJobs.BuildPsoSceneut_run.build(development=True)ut_shaders.run_pso_playerPsoJobs.InspectCollectionStreamingAssets/PSO/<platform>_<api>.graphicsstateAgentPsoProbepso_gateGpuCostJobs.MeasureFullscreenCostprecision_model.graphicsstate| Value | Relative to | Source |
|---|---|---|
| 7,688 full; 4,046 per stage; 62 after settings; 13 shipped | | observed |
| 13 to 11 | AgentLit shipped variants after excluding the soft shadow set in Shader Build Settings | observed |
| 433 to 577 | UberPost variants when one unused Bloom HQ + dirt profile sits under Assets/ | observed |
| 14 to 0; 1.8 to 2.4 ms | first-use GPU program uploads in gameplay, cold vs warm; warm-up of 26 to 27 PSOs in one frame, macOS player | observed |
| 0.007 to 0.033 / 0.29 to 0.42 / 0.89 to 1.66 ms | one 1080p full-screen draw: 64 multiply-adds / 64 | observed |
| 0.92 to 1.00 / 0.77 to 0.89 | half4 over float4 | observed |
| more than 128 keywords, 4 reserved | per shader: compile slows | 6.3 Manual |
| 2000 / 2450 / 3000 | Geometry / AlphaTest / Transparent queues | Cyanilux |
| 64x1x1, 8x8x1 | compute thread groups; ceil-divided dispatch plus bounds check | 6.3 Manual, [added] |
| (1.2, 0.35, 0.03) vs (4, 1.1, 0.15) | HDR dissolve edge that stays orange vs washes to cream under Neutral tonemapping | observed |
| 0.2126, 0.7152, 0.0722 | Rec. 709 luminance on linear color | 6.3 Manual |
lint_project_keywordsValidateShaderspso_gate| Mistake | What it looks like | Fix |
|---|---|---|
| no DepthOnly pass | object vanishes with Depth Priming Forced | |
| clip only in the forward pass | dissolved object still casts a full shadow | |
DepthNormals returns | wrong SSAO and outlines | return the raw normal |
| a second directional light lights nothing under Forward+ | loop |
| compile warning, dead shadow branch | |
| variant missing in the player: pink or closest match | material swap, or |
| a Boolean keyword to skip Shader Graph Alpha Clipping | whole object alpha-tested in every pass, all the time | Allow Material Override ( |
| variant count unchanged | test with |
| "a known keyword but not declared in this pass" | declare it for all stages |
| stray VolumeProfile assets (samples, tests) | post variants for effects no scene uses | move them out of Assets/; |
| one PSO collection for every API, or none proven | first-use hitches on device | per-API trace, cold vs warm runs |
| Depth Texture off on the URP asset | water turns to solid foam; hidden while SSAO still requests depth | enable on every URP asset that renders it; test with SSAO off |
| feature missing from one renderer | "the effect does nothing" on one quality level | |
| After Rendering injection | nothing drawn, back-buffer error | After Rendering Post Processing |
| HDR edge color 4 and up | emissive edge washes to cream | 1 to 1.5, Bloom carries the glow |
| judging cost by instruction count, or half on desktop | "optimized" shader no faster | |
properties outside | SRP Batcher off, values bleed | one CBUFFER in |
.graphicsstateValidateShadersURP_COMPATIBILITY_MODEAddBlitPassreturnBuilder: true_CLUSTER_LIGHT_LOOP_FORWARD_PLUS_LOW/_MEDIUM/_HIGHdynamic_branchFog.hlslEditorGraphicsSettings.Get/SetShaderBuildSettingsGraphicsStateCollectionCreateGraphicsGraphicsPipelineImplUploaded shader variant to the GPU driver: ...SetShaderUserValue(uint)MeshRendererSkinnedMeshRendererRendererunity_RendererUserValuereferences/procedures.mdreferences/expert-notes.mdreferences/critique.mdreferences/gui-paths.mdreferences/sources.mdscripts/ut_shaders.pyscripts/AgentKit/Shaders/ShaderJobsShaderLabRendererFeatureJobsVariantJobsPsoJobsComputeJobsGpuCostJobsShaderGraphJobsscripts/Runtime/AgentFullscreenFeature.csAgentPsoProbe.csscripts/Shaders/