diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7f493cbbd3d..7199a81536c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -550,6 +550,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed PBR shader ZTest rendering in deferred. - Replaced commands incompatible with async compute in light list build process. - Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly. +- Fixed unneeded cookie texture allocation for cone stop lights. ### Changed - Improve MIP selection for decals on Transparents diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index a81ef06827e..d8fc4cd3d03 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -2720,7 +2720,8 @@ internal void ReserveCookieAtlasTexture(HDAdditionalLightData hdLightData, Light break; case HDLightType.Spot: // Projectors lights must always have a cookie texture. - m_TextureCaches.lightCookieManager.ReserveSpace(light?.cookie ?? Texture2D.whiteTexture); + if (hdLightData.spotLightShape != SpotLightShape.Cone || light?.cookie != null) + m_TextureCaches.lightCookieManager.ReserveSpace(light?.cookie ?? Texture2D.whiteTexture); break; case HDLightType.Area: // Only rectnagles can have cookies