How Unity 2021.3.f1 Use Forward+ To Using Spot-Light Cookie Texture.

1、Add Scripting Define Symbols key-world “URP_ENABLE_CLUSTERED_UI”
2、Clustered(expermental)
8221164--1073589--upload_2022-6-21_15-12-32.png

I tried the experimental function Forward+, and there was a Bug in the Cookie mode when SpotLight was turned on. I went to locate the Bug and found the problem with lightcookieInput.hlsl calling SAMPLE_TEXTRE2D (). But it works when I use the SAMPLE_TEXTURE2D_LOD () function instead. Does Unity officially know of a better way? Or this Bug can be fixed.


For SAMPLE_TEXTURE2D()

For SAMPLE_TEXTURE2D_LOD()

Hi, I’ve tested light cookie (spot light) with Forward+ in 2022.2.a17 and there’s no error.

But I don’t think they will backport the fix to 2021 LTS.

By the way, Forward+ is no longer experimental in 2022.2:
8221440--1073661--URP14.0.3_ForwardPlus.jpg

Yeah, this has been fixed in the latest version. It won’t be backported indeed due to the experimental and hidden status. But if you want to fix it yourself (by modifying URP), it required the light loop to have a [loop] attribute on it in the definition of the LIGHT_LOOP_BEGIN macro. A number of other things were fixed as well, and the tiling is much more accurate in the newer version.

  • Yes, the new Alpha version of Unity2022 is available, thank you.

Well, look forward to the official release of the new version of Unity. Thank you for your help.