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.
Hi @Zepir ,
Thanks for submitting a report on this issue. Could you please reference the Issue ID here?
The Issue ID is 1374364, someone found a hack to the problem on another thread I made ( Changing URP Asset Render Scale affects decal’s rendering - Unity Forum ), sorry for making duplicate threads but I really needed some fast help, you can remove one of them.
This still seems to be present, 5 months later - if you change the render scale to anything other than 1, this happens!
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.
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/product/unity/issues/guid/1343674/?_ga=2.226688349.1531665914.1647948826-340642410.1616874889 and implemented a local hack to get around this.
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.
@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.
What is the case number of your report?
1419602
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.
@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.
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?
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.
I attached a complete, minimalist repro project demonstrating the problem to bug report IN-9027, and they linked to Unity Issue Tracker - [URP] Decal rendering is affected when changing Render Scale value, which has been “Fix in Review” for multiple months.
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 Thanks, whoever was responsible for getting this done.