Search Issue Tracker

Won't Fix

Under Consideration for 2021.3.X, 2022.3.X, 2023.2.X

Votes

0

Found in

2021.3.36f1

2022.3.22f1

2023.2.16f1

6000.0.0b13

Issue ID

UUM-67710

Regression

No

URP Enums are not generated correctly when compared with ShaderGraphs Enums

--

-

Reproduction Steps:
1. Open the attached project "ReproProjectGuoda.zip"
2. Create a new Material utilizing the URP/Lit Shader
3. With the material selected, navigate to the Inspector Window and click on the "Edit" button
4. In your IDE, Enter "SHADOWS_SOFT" in the search field
5. Carefully examine the prefix associated with the keyword.

Expected result: There should be a single underscore at the beginning of the keywords as shown
(#pragma multi_compile _SHADOWS_SOFT _SHADOWS_SOFT)
Actual result: There are two underscores at the beginning of the keywords
( #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT)

Reproducible with: 12.1.14 (2021.3.36f1), 14.0.10 (2022.3.22f1), 16.0.5 (2023.2.16f1), 17.0.2 (6000.0.0b13)

Testing environment: Windows 11 23H2 (22631.3007), Windows 10 (10.0.19045) 64bit (user’s)
Not reproducible on: No other environment tested

Notes: For comparison purposes, you can view the generated shader code by opening the "ShadowReceiverDirectionalAndAdditional" shader graph located in the Project at {{{}Assets/DevDunkStudio/ShadowReceiverURP/Shaders/MainAndAdditionalLights/ShadowReceiverDirectionalAndAdditional.shadergraph{}}}.

  1. Resolution Note:

    You can read about the purpose of the underscore here: https://docs.unity3d.com/Manual/SL-MultipleProgramVariants.html.

    If you find that the behavior of your shaders is not as expected, please open a new issue that details how the this impacts your expected or desired outcomes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.