-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
The output resolution of the Blur Node
doesn't automatically adjust when the Resolution of the Visual Compositor component changes. This leads to rendering errors when the Resolution is modified, requiring the Blur Node
to be deleted and rebuilt.
To Reproduce
Steps to reproduce the behavior:
- Create a Blur Node with the Visual Compositor's Resolution set to 1920x1080.
- Change the Visual Compositor's Resolution to 2560x1440.
Unity (please complete the following information):
- Unity2021-Unity6000
- URP
- VisualCompositor 0.30.7
Additional context
Currently, the m_size
variable in the Blur Node
is only initialized to Vector2Int.Zero
when m_input
is null.
It's then set to Vector2Int(m_input.width, m_input.height)
.
However, when m_input
's width
and height
change, m_size
isn't updated accordingly.
I've implemented a temporary fix for this issue:
// Runtime/Scripts/Nodes/BlurNode.cs, line 49
if (m_size == Vector2Int.zero || m_size != new Vector2Int(m_input.width, m_input.height)) {
m_size.SetValue(new Vector2Int(m_input.width, m_input.height));
}
While frequent resolution changes may not be common, I believe this adjustment would be beneficial for flexibility and user experience. It's particularly useful when testing at lower resolutions (e.g., 1920x1080) but needing to output at higher resolutions (4K or 8K) to avoid aliasing issues.
I haven't verified if other nodes have similar issues, but it might be worth investigating.
Additionally, I've noticed a change in VisualCompositor 0.30.6
regarding the namespace location for RenderGraphModule in Unity 6. Specifically, in Runtime\Scripts\Nodes\ColorGrading\URP\ColorGradingLutPass.cs
, the line:
using UnityEngine.Experimental.Rendering.RenderGraphModule;
was updated to:
using UnityEngine.Rendering.RenderGraphModule;
This change has resulted in compatibility issues for users with older Unity versions, requiring them to manually downgrade to VisualCompositor 0.30.5
.
I believe it might be beneficial to use a preprocessor directive like #if UNITY_VERSION_2023_OR_NEWER
to handle this change. This approach would allow for better version compatibility across different Unity releases.
Would it be possible to consider implementing this change? It could greatly improve the user experience for those working with various Unity versions.
Thank you for your consideration.