Art: EmissiveGloam DOTS instancing + revive EnemyRigTools + drop dead materials (audit M7/M8)
M8 — ProjectM/EmissiveGloam had no DOTS instancing but is bound to M_Drowner_EyeGlow on EnemyDrowner.prefab, a baked GHOST prefab that Entities Graphics renders through BatchRendererGroup. Its skinned sibling has carried the pragmas since 07-16; this one was simply missed, and murk hides the symptom (CLAUDE.md: "a dark-lit screenshot MASKS material bugs"). Added #pragma target 4.5 + multi_compile DOTS_INSTANCING_ON + UNITY_SETUP_INSTANCE_ID, and a DepthOnly pass so the glows stop being absent from the URP depth texture (soft particles / SSAO / DoF punch straight through them otherwise). Verified: shader compiles, isSupported, 2 passes, 0 messages. M7 — EnemyRigTools was dead at EVERY entry point. All eight hard-coded prefab paths were deleted by DR-051, and the template check ran BEFORE the idempotent in-place branch, so even re-running a builder on an existing prefab failed. The three shipping skinned creatures were unreproducible. Now the template only matters when there is no output to edit in place, and a new creature templates off the shipping EnemyDrowner ghost (GhostTemplate) instead of the deleted Enemy.prefab. Retired the four menu items that drove the deleted Werewolf/Kaiju/Charger bestiary rather than leave them advertising entry points that cannot work. Deleted 19 materials with zero references from any scene, prefab, ScriptableObject, script or settings asset — verified three ways, not from the audit's list. Kept everything with a live reference, including several the audit's asset-only scan called dead but which code loads by path (M_Skinned_Palette, PixelOutline, M_Env_Fallback). NOT fixed here, deliberately: MakeMat still points each creature at a per-PACK Synty atlas rather than the shared palette. That is a visual decision about the shipping Drowner/Grindylow, not a mechanical fix — the doc-vs-reality gap gets reconciled in Art_Direction_Lantern instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,11 +20,23 @@ Shader "ProjectM/EmissiveGloam"
|
||||
Name "EmissiveGloamUnlit"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
HLSLPROGRAM
|
||||
// DOTS instancing (2026-08-06 audit, finding M8): this shader is bound to M_Drowner_EyeGlow on
|
||||
// EnemyDrowner.prefab — a baked GHOST prefab, so Entities Graphics renders it through
|
||||
// BatchRendererGroup, which feeds per-instance transforms via DOTS instancing. Without these three
|
||||
// lines the eyes do not get correct instance data. Its skinned sibling
|
||||
// (EmissiveGloamSkinned.shader) has carried them since 07-16; this one was simply missed, and a murk
|
||||
// scene hides the symptom (CLAUDE.md: "a dark-lit screenshot MASKS material bugs").
|
||||
#pragma target 4.5
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile _ DOTS_INSTANCING_ON
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
struct Attributes { float4 positionOS : POSITION; };
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
struct Varyings { float4 positionHCS : SV_POSITION; };
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
@@ -36,6 +48,7 @@ Shader "ProjectM/EmissiveGloam"
|
||||
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
Varyings OUT;
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
return OUT;
|
||||
@@ -52,6 +65,42 @@ Shader "ProjectM/EmissiveGloam"
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
// DepthOnly (2026-08-06 audit, finding L-shader): without it these glows are absent from URP's depth
|
||||
// texture, so soft particles (marine snow), SSAO and depth-of-field punch straight through them. Costs
|
||||
// nothing today with two materials; would be a visible bug the moment Emissive-Gloam becomes "every glow
|
||||
// in the game", which is the A2 variant plan.
|
||||
Pass
|
||||
{
|
||||
Name "DepthOnly"
|
||||
Tags { "LightMode"="DepthOnly" }
|
||||
ZWrite On
|
||||
ColorMask R
|
||||
HLSLPROGRAM
|
||||
#pragma target 4.5
|
||||
#pragma vertex depthVert
|
||||
#pragma fragment depthFrag
|
||||
#pragma multi_compile _ DOTS_INSTANCING_ON
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
struct DepthAttributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
struct DepthVaryings { float4 positionHCS : SV_POSITION; };
|
||||
|
||||
DepthVaryings depthVert (DepthAttributes IN)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
DepthVaryings OUT;
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half depthFrag (DepthVaryings IN) : SV_Target { return 0; }
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user