Skip to content

Commit a8b316c

Browse files
skhiatJulienIgnace-UnitysebastienlagardeFrancescoC-unitypmavridis
committed
Fix 1299233 ies resize bug (#3094)
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <[email protected]> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <[email protected]> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <[email protected]> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <[email protected]> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality. (#3020) Co-authored-by: sebastienlagarde <[email protected]> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <[email protected]> * Changed the warning message for ray traced area shadows (case 1303410). (#3029) * - Changed the warning message for ray traced area shadows (case 1303410). * Adds approximation information about ray-traced area shadows Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: sebastienlagarde <[email protected]> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <[email protected]> * Fix 1299233 ies resize bug * change log * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: Sebastien Lagarde <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Pavlos Mavridis <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: slunity <[email protected]> Co-authored-by: Adrien de Tocqueville <[email protected]> Co-authored-by: Rémi Chapelain <[email protected]> Co-authored-by: anisunity <[email protected]> Co-authored-by: Lewis Jordan <[email protected]>
1 parent 7f76157 commit a8b316c

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public void ReserveSpace(Texture cookieA, Texture cookieB)
341341
if (width < k_MinCookieSize || height < k_MinCookieSize)
342342
return;
343343

344-
if (!m_CookieAtlas.ReserveSpace(m_CookieAtlas.GetTextureID(cookieA, cookieB), width, height))
344+
if (!m_CookieAtlas.ReserveSpace(cookieA, cookieB, width, height))
345345
m_2DCookieAtlasNeedsLayouting = true;
346346
}
347347

@@ -369,7 +369,7 @@ public void ReserveSpaceCube(Texture cookie)
369369
if (projectionSize < k_MinCookieSize)
370370
return;
371371

372-
if (!m_CookieAtlas.ReserveSpace(m_CookieAtlas.GetTextureID(cookie), projectionSize, projectionSize))
372+
if (!m_CookieAtlas.ReserveSpace(cookie, projectionSize, projectionSize))
373373
m_2DCookieAtlasNeedsLayouting = true;
374374
}
375375

@@ -385,7 +385,7 @@ public void ReserveSpaceCube(Texture cookieA, Texture cookieB)
385385
if (projectionSize < k_MinCookieSize)
386386
return;
387387

388-
if (!m_CookieAtlas.ReserveSpace(m_CookieAtlas.GetTextureID(cookieA, cookieB), projectionSize, projectionSize))
388+
if (!m_CookieAtlas.ReserveSpace(cookieA, cookieB, projectionSize, projectionSize))
389389
m_2DCookieAtlasNeedsLayouting = true;
390390
}
391391

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/PowerOfTwoTextureAtlas.cs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ public bool ReserveSpace(Texture texture)
195195
{
196196
m_RequestedTextures[texture.GetInstanceID()] = new Vector2Int(texture.width, texture.height);
197197

198+
if (NeedsUpdate(texture))
199+
return false;
200+
198201
// new texture
199202
if (!IsCached(out _, texture))
200203
{
@@ -205,10 +208,34 @@ public bool ReserveSpace(Texture texture)
205208
return true;
206209
}
207210

208-
public bool ReserveSpace(int id, int width, int height)
211+
// pass width and height for CubeMap (use 2*width) & Texture2D (use width)
212+
public bool ReserveSpace(Texture texture, int width, int height)
209213
{
214+
int id = GetTextureID(texture);
210215
m_RequestedTextures[id] = new Vector2Int(width, height);
211216

217+
if (NeedsUpdate(texture))
218+
return false;
219+
220+
// new texture
221+
if (!IsCached(out _, id))
222+
{
223+
Vector4 scaleBias = Vector4.zero;
224+
if (!AllocateTextureWithoutBlit(id, width, height, ref scaleBias))
225+
return false;
226+
}
227+
return true;
228+
}
229+
230+
// pass width and height for CubeMap (use 2*width) & Texture2D (use width)
231+
public bool ReserveSpace(Texture textureA, Texture textureB, int width, int height)
232+
{
233+
int id = GetTextureID(textureA, textureB);
234+
m_RequestedTextures[id] = new Vector2Int(width, height);
235+
236+
if (NeedsUpdate(textureA, textureB))
237+
return false;
238+
212239
// new texture
213240
if (!IsCached(out _, id))
214241
{

0 commit comments

Comments
 (0)