Steps to reproduce:
1. Create new Unity project using Universal 2D Template
2. Import “KeywordlessLight2D.shader” into the project
3. Right-click on the shader > Create > Material
4. In a scene with a Sprite using Sprite-Lit-Default, add a Light 2D, set Light Type to Spot.
5. Assign the new Material to the Light 2D's Material field
6. Look at the Console with Error Pause off, and leave the Scene view visible.
Actual results:
Four errors are logged per light per rendered frame, continuously, in both the Scene view and the Game view:
Local keyword USE_VOLUMETRIC doesn't exist in the shader.
Local keyword USE_ADDITIVE_BLENDING doesn't exist in the shader.
Local keyword USE_POINT_LIGHT_COOKIES doesn't exist in the shader.
Local keyword USE_NORMAL_MAP doesn't exist in the shader.
Expected results: A custom light Material that URP reports as compatible renders without logging errors. Keyword writes are skipped for keywords the shader does not declare, exactly as the shadow path already does.
Reproducible with versions: 6000.7.0b1, 7000.0.0a1
Can’t test with versions: 6000.0.84f1, 6000.3.24f1, 6000.5.11f1, 6000.6.2f1, 6000.7.0a6 (Light2D.material doesn’t exist)
Tested on (OS): macOS 26.6.1 (Apple silicon)