Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Changing URP Asset Render Scale affects decal's rendering

Discussion in '2021.2 Beta' started by Zepir, Oct 25, 2021.

  1. Zepir

    Zepir

    Joined:
    Dec 16, 2016
    Posts:
    18
    Changing the render scale of a Universal Render Pipeline Asset changes the position of the new decals renderer feature introduced in Unity 2021.2.

    It's pretty easy to reproduce, just add the new decals to a scene and change the slider "Render Scale" to a value different than 1, the decals completely disappear at some point. Already sent a bug report last week and still no answer.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    Hi @Zepir,

    Thanks for submitting a report on this issue. Could you please reference the Issue ID here?
     
  3. Zepir

    Zepir

    Joined:
    Dec 16, 2016
    Posts:
    18
  4. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    QA wasn't able to reproduce the issue reported by @Zepir. If you are still affected by this in a recent version of 2021.2, please submit a bug report so we can look into your case.
     
  6. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    Really? 3 seconds of looking at ScriptableRenderer.cs shows that the line 221.

    cmd.SetGlobalVector(ShaderPropertyId.screenSize, new Vector4(cameraWidth, cameraHeight, 1.0f / cameraWidth, 1.0f / cameraHeight));

    is still incorrect, and it should be

    cmd.SetGlobalVector(ShaderPropertyId.screenSize, new Vector4(scaledCameraWidth, scaledCameraHeight, 1.0f / scaledCameraWidth, 1.0f / scaledCameraHeight));

    in version com.unity.render-pipelines.universal@12.1.5


    I already updated https://issuetracker.unity3d.com/pr...49.1531665914.1647948826-340642410.1616874889 and implemented a local hack to get around this.
     
    Caesoose likes this.
  7. Caesoose

    Caesoose

    Joined:
    Jul 9, 2013
    Posts:
    2
    Yeah this bug is affecting my player blob shadow - the second I touch the render scale at all, the scale of the decals gets changed, making them non-existent past 0.97 Render scale.
     
  8. Zepir

    Zepir

    Joined:
    Dec 16, 2016
    Posts:
    18
    @LeonhardP just installed Unity 2021.3 (LTS) to try it out and this bug still exists in com.unity.render-pipelines.universal@12.1.6. Already sent another bug report.
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    What is the case number of your report?
     
  10. Zepir

    Zepir

    Joined:
    Dec 16, 2016
    Posts:
    18
    1419602
     
    Claytonious and LeonhardP like this.
  11. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    865
    This is definitely still an issue. @LeonhardP do you guys need a better repro project or something? I can submit one if that is the problem.
     
  12. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,351
    @LeonhardP I can confirm this is also an issue in 2022.2 beta with URP 14.0.3, line 256. In the official release, Decal Projectors are only working properly at a render scale of 100%. With the fix, it works perfectly. Tested with Forward rendering and a WebGL build.

    The same issue likely exists in 2023.1, given URP 15.0.0 line 258.
     
    Claytonious likes this.
  13. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    865
    It's inexplicable that we can't seem to get this fixed even with the specific line number and bug given directly here and elsewhere numerous times. What in the world is happening at Unity?
     
  14. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,633
    This bug is a good example of the issues with Unity's current QA/production processes:
    • The issue was reported almost a year ago.
    • It can be reproduced on an empty project following simple steps.
    • The fix is a single line change.
    Either QA didn't properly understand the repro steps or there's a difference in setup that went unnoticed and nobody from the URP team stumbled upon this thread (maybe it would have a higher chance in the URP section). Also, it hints that not all features are tested for compatibility with resolution scaling in URP's automated tests.
     
    Claytonious likes this.
  15. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    865
    projectorgames_unity likes this.
  16. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,351
    This appears to be fixed in the latest release of 14.0.3 (which curiously is still "14.0.3" despite a number of changes.. something I may create another thread about - requesting versions be incremented so we know there's a newer release available). For those using 15, it may also be worth backing up your modified version and seeing if the official 15 has also been fixed, as I don't currently have 2023 installed to confirm. According to the issuetracker link in the above post by @Claytonious, says Fixed in 2023.1.0a10. I'm using 2022.2.0b10 and the 14.0.3 which installs with 3D URP project template is also fixed :D Thanks, whoever was responsible for getting this done.