fix: keep URP 17.5 LitInput out of the DCL_Toon ForwardLit pass#95
fix: keep URP 17.5 LitInput out of the DCL_Toon ForwardLit pass#95eordano wants to merge 1 commit into
Conversation
🔗 Merge Alignment ReminderIf this PR targets Both repos should be merged in coordination to avoid breaking changes. Do not merge one without the other being ready. |
Expanded during player-build verificationThe initial commit only handled the editor-visible
Cross-version player-build verified
Safe to merge ahead of the 6000.5 upgrade. 🤖 Generated with Claude Code |
|
✅ 6000.4 clean-pass player build now confirmed: SUCCEEDED, 0 shader / 0 script errors, |
- DCL_Toon ForwardLit: claim UNIVERSAL_LIT_INPUT_INCLUDED, inline IsSurfaceTypeTransparent (6000.4 URP has no SurfaceType.hlsl). - Toon outline/highlight and CelShading depth-normals: GetObjectToWorldMatrix instead of unity_ObjectToWorld; carry the instance id into the toon outline fragment stage. - Scene URP Lit/Unlit input: UNITY_ACCESS_DOTS_INSTANCED_PROP replaces the removed _FROM_MACRO accessor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
de4cce8 to
5261933
Compare
|
✅ Windows/DirectX verified. Full 6000.5.4f1 StandaloneWindows64 player build on the Windows rig succeeded — 0 shader errors, 0 CS errors across 132k log lines, Explorer.exe produced. The DCL_Toon ForwardLit, DCL/Scene, and all DOTS-instancing variants compiled clean on d3d11. This closes the last platform gap: the upgrade's shader fixes now verified on both macOS/Metal and Windows/DirectX, across both 6000.4 and 6000.5 editors. |
Unity 6000.5's URP added
#include "LitInput.hlsl"toLitForwardPass.hlsl, which pullsShaderLibrary/SurfaceInput.hlslinto the one DCL translation unit that includes URP's real LitForwardPass (DCL_Toon ForwardLit) — colliding withDCL_ToonInput.hlsl(_BaseMap,Alpha, UnityPerMaterial members) and rendering avatars magenta.Fix (+16 lines, one file): pre-claim URP's
UNIVERSAL_LIT_INPUT_INCLUDEDguard so the new self-include no-ops (the same guard-reuse pattern this repo already uses inScene/URP/LitInput.hlsl), and inline the parameterlessIsSurfaceTypeTransparent()that 6000.5's LitForwardPass calls — under the real file's own guard, sinceShaders/Utils/SurfaceType.hlsldoes not exist in 6000.4's URP. With_Surfacedefined0.0fit returns false, matching the 6000.4 behavior exactly.Cross-version verification (both zero errors, zero shader errors):
dev(Unity 6000.4.0f1) with this branchSafe to merge ahead of the upgrade PR; #9392 currently pins this branch and will repoint to main after merge.
🤖 Generated with Claude Code