Search Issue Tracker

Active

Under Consideration for 2022.3.X

Votes

22

Found in

2022.3.38f1

6000.0.11f1

Issue ID

UUM-76514

Regression

No

Shadows.SRPBatcher has incorrect cull mode values when rendering shadow casters

--

-

Reproduction steps:
1. Open the “ReproProject“ project
2. Open the “Assets/Scenes/SampleScene“ scene
3. Observe the green plane in the Game View

Expected result: The green plane is not casting a shadow
Actual result: The green plane is casting a shadow

Reproducible with: 2022.3.38f1, 6000.0.11f1
Couldn’t test with: 2021.3.41f1 (due to compilation errors)

Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested

Note:
The green plane has cull mode set to ‘Front’. The beige plane has cull mode set to ‘Back’. During the shadow caster pass both planes have cull mode set to ‘Back’. That causes the green plane to cast shadow. But it should be culled away during the shadow caster pass because the light source sees only the back face of the green plane.

Comments (3)

  1. joanm3867

    Aug 25, 2024 01:18

    Despite being real, it still feels like a dream. Upon discovering this page and the group admin's recommendation, along with other community evaluations confirming its legality, I felt compelled to give PRIME a try, trusting that whatever outcome I would have to accept. Helped me raise my credit score from 480 to 801, which surprised me the most. Hard questions focusing on TU, EQ, and EX were eliminated. In fact, they enhanced my report with a few tradelines. Much appreciation to PRIMECREDITSPECIALIST(at)GMAIL(dot) COM

  2. evelynmartinez9911

    Aug 12, 2024 07:52

    How do I recover $222,500. BTC sent to a romance scammer?
    It's possible to get back your money little I know it was a big shock of my life because the company i sent my money to was revealed to be a total scam.
    I contacted the professional and they helped me with the recovery of all my money successfully, you can also contact them for help. They will help you retrieve back your money, I was able to retrieve all my money back through the professional, you can contact them too they are ready to help....

    Email Address: dwchzone @ gmail . com

    Whats-App: + 1 (803) 392 - 1735

  3. darrin5698

    Aug 07, 2024 09:15

    It looks like you're encountering an issue with shadows in Unity where the green plane is casting a shadow despite its cull mode settings. Here are some steps and suggestions to help you troubleshoot and resolve this issue:

    Steps to Verify and Troubleshoot
    Check Shadow Casting Settings:

    Select the green plane in the hierarchy.
    In the Inspector window, verify that the Mesh Renderer component has Cast Shadows set to Off or On depending on your intended behavior. If it is set to On, try setting it to Off to see if that resolves the issue.
    Verify Material Settings:

    Ensure that the material assigned to the green plane has the correct culling mode. In your shader or material settings, make sure the Cull mode is set correctly (e.g., Front for the green plane).
    Double-check if the shader is correctly handling the culling mode during the shadow caster pass.
    Shadow Casting in Shaders:

    If you're using custom shaders, ensure that the shadow caster pass is implemented correctly. Here’s an example snippet for handling culling in the shadow caster pass:
    hlsl
    Copy code
    Pass {
    Name "ShadowCaster"
    Tags {"LightMode" = "ShadowCaster"}
    Cull Back
    // Other shadow caster settings
    }
    Make sure the shader does not override the cull mode during the shadow casting phase unexpectedly.
    Test with Default Shader:

    Temporarily assign a default Unity shader (e.g., Standard Shader) to the green plane to see if the issue persists. This will help determine if the issue is with your custom shader or with the Unity settings.
    Update Graphics Settings:

    Open Edit > Project Settings > Graphics.
    Ensure that your rendering pipeline settings are correctly configured, and there are no overrides affecting the shadow casting.
    Check Light Source Settings:

    Select the light source (e.g., Directional Light) in your scene.
    In the Inspector window, verify the shadow settings and ensure they are configured correctly.
    Test with Different Unity Versions:

    Since you mentioned that you couldn't test with 2021.3.41f1 due to compilation errors, try testing with other stable versions of Unity, if possible. This might help identify if the issue is specific to the Unity version you are using.
    Additional Note
    Given your explanation about the cull modes during the shadow caster pass, it might be worthwhile to examine how Unity handles the Cull settings internally during the shadow pass. If the green plane's front faces are being culled correctly during normal rendering but not during the shadow pass, it suggests a potential issue with how the shadow caster pass is being configured or overridden.

    If after following these steps the issue still persists, you might want to report this as a bug to Unity, including the steps to reproduce, your findings, and any relevant project files or minimal reproduction projects.

    Bug Reporting
    To report a bug to Unity:

    Open Unity and go to Help > Report a Bug.
    Fill in the details, including the reproduction steps, expected and actual results, and attach the minimal project if necessary.
    Submit the bug report.
    By doing this, Unity's support team can investigate the issue further and provide a fix in future releases.
    www-myloyola.com

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.