Skip to content

Commit f315cf7

Browse files
pmavridisJulienIgnace-UnitysebastienlagardeFrancescoC-unityalelievr
authored
[HDRP][Compositor] Fix issues with compositor's undo (#3100)
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issues with compositor's undo * Add fail-safe call to clear teh camera cache * Fix bad merge * Hd/fix 1299116 tesselation cull (#3057) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Fixing hull constant shader's tesselation cull algorithm. Before it was comparing edges being out of the frustum. This is wrong because the camera could be inside a triangle, in which case the edges could be out of at least 1 frustum plane. Correct fix is to check all three vertices if they are out of at least 1 plane. Result packed tightly into the functions w return component. * Renamed to a new function so we keep backwards compatibility. Restored the shadow shader pass path, accidentally changed it to bool4 and use near plane. * Fixing type back to bool, instead of bool4 * Merging changelog information from rebase. * Making sure scene declaration pass is a bool4 * Adding new test for tesselation culling, with a weird camera angle which fails previous setup. * Fixing formatting of code, rearranging order of test in editor build settings. * Adding reference images for test. * Missing meta file for new tests * Fix bad merge issue * fix bad merge issue * fix bad merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> * Change the source value for the ray tracing frame index iterator from m_FrameCount to the camera frame count (case 1301356). (#3032) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Added a RenderGraph pass that resets the camera size after the dynamic res upscale (#3070) * Added a RenderGraph pass that resets the camera size after the dynamic res upscale * Updated changelog # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md * fixed class name * update class name * PR fix * Fixed RTHandle scale Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix Light Intensity UI Prefab Override Application (1299563) (#3061) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Apply the fix * Changelog * Mofified approach to the fix, this time also fixing override saving of light unit * Use more precise rect line offset calculation * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> * Fix Undo/Redo Stability for Light Temperature (1304176, 1301076) (#3079) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Apply the fix * Changelog * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> * Fix labels style (#3046) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Fix labels style * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> * Fixed side effect on styles during compositor rendering. (#3081) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed side effect on styles during compositor rendering. * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> * [HDRP][Compositor] Fix size and spacing of compositor info boxes (#3101) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Removed 2505_Area_Light_ShadowMask_Baking from baking queue (#3087) * Lightmaps / Removed scene from baking queue + meta files * update reference screenshots Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix size and spacing of compositor info boxes * Fix typo in changelog Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> * [HDRP][Compositor] Fix color picker UI glitch in the Graphics Compositor (#3105) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Removed 2505_Area_Light_ShadowMask_Baking from baking queue (#3087) * Lightmaps / Removed scene from baking queue + meta files * update reference screenshots Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Removed unused index parameter * Fix box light attenuation (#3056) * Fix box light attenuation * Update screenshots Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Revert "Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023)" This reverts commit 55bb6ff. * Revert "Revert "Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023)"" This reverts commit 57ee23b. * Fix default value of _SpecularOcclusionBlend * Fix color picker UI glitch in the Graphics Compositor Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> * Fix 1299233 ies resize bug (#3094) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix 1299233 ies resize bug * change log * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> * filter for xbone addded (#3116) * [Yamato] Enable cache server for standalone build jobs (#3106) * create standalone_cache jobs * use cache jobs for trunk verification * fix commands so linux can recognise them need to wrap each string around "extra-editor-arg" * Fix undo redo on layered lit editor (#3059) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Fix undo redo on layered lit editor * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> * [HDRP] Added Vulkan install in system requirements (#3122) * Added vulkan install in system requirements * Reworded content Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> * [HDRP] Fix issue with compositor related custom passes (#3055) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Fix issue with compositor related custom passes still active after disabling the compositor Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> * Fixed some render texture leaks. (#3050) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * 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 <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * 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 * Fixed a few render texture memory leaks. * Update changelog * Added comment * Update CHANGELOG.md Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> * Hd/fix wizard runtime resources (#3123) * Fix runtim resource wizard fix regression * Update CHANGELOG.md Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fixed lookdev reload bug when viewing a scene object (#3108) * Fixed lookdev reload bug when viewing a scene object * Updated changelog * Re-added lookdev fix Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix error in Depth Of Field near radius blur calculation (#3131) * Fix error in Depth Of Field near radius blur calculation * Fix typo Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix GC allocs (#3136) * Fix gc alloc errors * Avoid setting the name of an object during render (gc alloc) * Avoid gc allocs (for real this time) * Revert: Fix 1299233 ies resize bug (#3094) * Hide light shadow near plane gizmo when shadows are disabled (#3114) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed undo when adding/removing layers * Fix AOV crash * Removed unnecessaryusing directives + changelog update * Do not change the selected layer after undo Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com> Co-authored-by: John Parsaie <johnpa@unity3d.com> Co-authored-by: skhiat <55133890+skhiat@users.noreply.github.com> Co-authored-by: Martin Thorzen <35328557+martint-unity@users.noreply.github.com> Co-authored-by: Sophia <16596228+sophiaaar@users.noreply.github.com> Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>
1 parent ba1336f commit f315cf7

File tree

7 files changed

+122
-4
lines changed

7 files changed

+122
-4
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3030
- Fixed light gizmo showing shadow near plane when shadows are disabled.
3131
- Fixed path tracing alpha channel support (case 1304187).
3232
- Fixed shadow matte not working with ambient occlusion when MSAA is enabled
33+
- Fixed issues with compositor's undo (cases 1305633, 1307170).
3334

3435
### Changed
3536
- Change the source value for the ray tracing frame index iterator from m_FrameCount to the camera frame count (case 1301356).

com.unity.render-pipelines.high-definition/Editor/Compositor/CompositionManagerEditor.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,22 @@ static partial class Styles
4949
public bool isDirty => m_IsEditorDirty;
5050

5151
public int defaultSelection = -1;
52-
public int selectionIndex => m_layerList != null ? m_layerList.index : -1;
52+
public int selectionIndex
53+
{
54+
get => m_layerList != null ? m_layerList.index : -1;
55+
set
56+
{
57+
if (m_layerList != null) m_layerList.index = Math.Min(value, m_layerList.count - 1);
58+
}
59+
}
60+
5361

5462
void AddLayerOfTypeCallback(object type)
5563
{
5664
Undo.RecordObject(m_compositionManager, "Add compositor sublayer");
5765
m_compositionManager.AddNewLayer(m_layerList.index + 1, (CompositorLayer.LayerType)type);
5866
m_SerializedProperties.layerList.serializedObject.Update();
67+
m_compositionManager.DeleteLayerRTs();
5968
m_compositionManager.UpdateLayerSetup();
6069
}
6170

com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ void OnGUI()
114114
Undo.RegisterCreatedObjectUndo(compositor.outputCamera.gameObject, "Create Compositor");
115115
Undo.RegisterCreatedObjectUndo(go, "Create Compositor");
116116
}
117-
else if (compositor)
117+
else if (compositor && (compositor.enabled != enableCompositor))
118118
{
119119
string message = enableCompositor ? "Enable Compositor" : "Disable Compositor";
120120
Undo.RecordObject(compositor, message);
121121
compositor.enabled = enableCompositor;
122122
}
123-
else
123+
else if (!compositor)
124124
{
125125
return;
126126
}
@@ -178,6 +178,9 @@ void OnGUI()
178178
if (m_Editor)
179179
{
180180
m_Editor.OnInspectorGUI();
181+
182+
// Remember which layer was selected / drawn in the last draw call
183+
s_SelectionIndex = m_Editor.selectionIndex;
181184
}
182185
}
183186
GUILayout.EndScrollView();
@@ -214,7 +217,11 @@ void UndoCallback()
214217

215218
m_Editor.CacheSerializedObjects();
216219
m_RequiresRedraw = true;
217-
s_SelectionIndex = m_Editor.selectionIndex;
220+
221+
// After undo, set the selection index to the last shown layer, because the Unity Editor resets the value to the last layer in the list
222+
m_Editor.defaultSelection = s_SelectionIndex;
223+
m_Editor.selectionIndex = s_SelectionIndex;
224+
218225

219226
CompositionManager compositor = CompositionManager.GetInstance();
220227
// The compositor might be null even if the CompositionManagerEditor is not (in case the user switches from a scene with a compositor to a scene without one)
@@ -223,6 +230,10 @@ void UndoCallback()
223230
// Some properties were changed, mark the profile as dirty so it can be saved if the user saves the scene
224231
EditorUtility.SetDirty(compositor);
225232
EditorUtility.SetDirty(compositor.profile);
233+
234+
// Clean-up existing cameras after undo, we will re-allocate the layer resources
235+
CompositorCameraRegistry.GetInstance().CleanUpCameraOrphans(compositor.layers);
236+
compositor.DeleteLayerRTs();
226237
compositor.UpdateLayerSetup();
227238
}
228239
}

com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionLayer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ public void Init(string layerID = "")
259259
m_LayerCamera = newCameraGameObject.AddComponent<Camera>();
260260
newCameraGameObject.AddComponent<HDAdditionalCameraData>();
261261
CopyInternalCameraData();
262+
CompositorCameraRegistry.GetInstance().RegisterInternalCamera(m_LayerCamera);
262263

263264
m_LayerCamera.name = "Compositor" + layerID;
264265
m_LayerCamera.gameObject.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy | HideFlags.HideAndDontSave;
@@ -421,6 +422,7 @@ public void DestroyCameras()
421422
CoreUtils.Destroy(cameraData);
422423
}
423424
m_LayerCamera.targetTexture = null;
425+
CompositorCameraRegistry.GetInstance().UnregisterInternalCamera(m_LayerCamera);
424426
CoreUtils.Destroy(m_LayerCamera);
425427
m_LayerCamera = null;
426428
}

com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ void OnDestroy()
555555
// We don't need the custom passes anymore
556556
var hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
557557
UnRegisterCustomPasses(hdPipeline);
558+
559+
// By now the s_CompositorManagedCameras should be empty, but clear it just to be safe
560+
CompositorCameraRegistry.GetInstance().CleanUpCameraOrphans();
558561
}
559562

560563
public void AddInputFilterAtLayer(CompositionFilter filter, int index)
@@ -962,5 +965,6 @@ static internal void UnRegisterCustomPasses(HDRenderPipeline hdPipeline)
962965
hdPipeline.asset.beforePostProcessCustomPostProcesses.Remove(typeof(AlphaInjection).AssemblyQualifiedName);
963966
}
964967
}
968+
965969
}
966970
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
using System.Collections.Generic;
2+
using UnityEngine.Rendering;
3+
using UnityEngine.Rendering.HighDefinition;
4+
5+
namespace UnityEngine.Rendering.HighDefinition.Compositor
6+
{
7+
// Internal class to keep track of compositor allocated cameras.
8+
// Required to properly manage cameras that are deleted or "ressurected" by undo/redo operations.
9+
class CompositorCameraRegistry
10+
{
11+
static List<Camera> s_CompositorManagedCameras = new List<Camera>();
12+
static private CompositorCameraRegistry s_CompositorCameraRegistry;
13+
static public CompositorCameraRegistry GetInstance() =>
14+
s_CompositorCameraRegistry ?? (s_CompositorCameraRegistry = new CompositorCameraRegistry());
15+
16+
// Keeps track of compositor allocated cameras
17+
internal void RegisterInternalCamera(Camera camera)
18+
{
19+
s_CompositorManagedCameras.Add(camera);
20+
}
21+
internal void UnregisterInternalCamera(Camera camera)
22+
{
23+
s_CompositorManagedCameras.Remove(camera);
24+
}
25+
26+
// Checks for any compositor allocated cameras that are now unused and frees their resources.
27+
internal void CleanUpCameraOrphans(List<CompositorLayer> layers = null)
28+
{
29+
s_CompositorManagedCameras.RemoveAll(x => x == null);
30+
31+
for (int i = s_CompositorManagedCameras.Count - 1; i >= 0; i--)
32+
{
33+
bool found = false;
34+
if (layers != null)
35+
{
36+
foreach (var layer in layers)
37+
{
38+
if (s_CompositorManagedCameras[i].Equals(layer.camera))
39+
{
40+
found = true;
41+
break;
42+
}
43+
}
44+
}
45+
46+
// If the camera is not used by any layer anymore, then destroy it
47+
if (found == false && s_CompositorManagedCameras[i] != null)
48+
{
49+
var cameraData = s_CompositorManagedCameras[i].GetComponent<HDAdditionalCameraData>();
50+
if (cameraData)
51+
{
52+
CoreUtils.Destroy(cameraData);
53+
}
54+
s_CompositorManagedCameras[i].targetTexture = null;
55+
CoreUtils.Destroy(s_CompositorManagedCameras[i]);
56+
s_CompositorManagedCameras.RemoveAt(i);
57+
}
58+
}
59+
60+
if (layers != null)
61+
{
62+
foreach (var layer in layers)
63+
{
64+
if (layer != null && !s_CompositorManagedCameras.Contains(layer.camera))
65+
{
66+
s_CompositorManagedCameras.Add(layer.camera);
67+
}
68+
}
69+
}
70+
}
71+
72+
internal void PrinCameraIDs()
73+
{
74+
for (int i = s_CompositorManagedCameras.Count - 1; i >= 0; i--)
75+
{
76+
var id = s_CompositorManagedCameras[i] ? s_CompositorManagedCameras[i].GetInstanceID() : 0;
77+
}
78+
}
79+
}
80+
}

com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositorCameraRegistry.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)