Skip to content

Internal/master #8137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d174377
Update UNITY_CODEOWNERS and .buginfo for Postprocessing and UI Features
BenGraterUnity Mar 24, 2025
3ac4ef2
DirectX 11 is supported on PC on runtime
ocarrere Mar 24, 2025
36b26a5
HDRP_RuntimeTests: Ignore failing linux/switch tests.
amsXYZ Mar 24, 2025
4a6a4e2
Graphics package docs feedback tickets
fatimah-f Mar 24, 2025
499b2bf
Revert "Terrain - fix urp render layers"
Mar 24, 2025
6c35e08
Add internal access to SSS buffers in custom passes
alelievr Mar 24, 2025
0f54b38
Marked some shader related C# API as deprecated
aleks01010101 Mar 24, 2025
7e89b15
Docs accessibility sprint 2025 march oleks 3
oleks-k Mar 24, 2025
bbacd99
[SRP] [UUM-77625] Change SS UI within SRP to render once from the las…
mseonkim-unity Mar 25, 2025
26104f6
[SRPF] Added HDRP tests for previews
kirill-titov-u Mar 26, 2025
63b27e8
Fix shadows for additional lights in URP
pmavridis Mar 26, 2025
b9799ed
Fix local volumetric fog position node in ShaderGraph
alelievr Mar 26, 2025
46585fd
Convert VisualEffectGraph URP/HDRP Projects to use Graphics Test Fram…
EdvinasSkir Mar 26, 2025
508877c
Remove obsolete Deform a water surface section
ocarrere Mar 27, 2025
f3290c1
When adding a depth attachment for the purposes of render pass mergin…
Paulm-Unity Mar 27, 2025
0970763
[ShaderGraph] Fix a regression with preview time updating.
Mar 27, 2025
23a56a9
Improve Render Graph debug options
arttu-peltonen Mar 27, 2025
0b4f239
Update AdvancedProperties.cs
RSlysz Mar 27, 2025
4090497
Fix HeaderFoldout in List
RSlysz Mar 27, 2025
a063ca7
Terrain - fix urp deferred rendering
jonbro Mar 27, 2025
c76877b
Fix out of sync number label in Render Pipeline Converter
arttu-peltonen Mar 27, 2025
ab38439
Custom mesh water surface normal map fades out when Y Position increases
SuminCho1 Mar 27, 2025
abefe2d
[VFX Graph] ArcCone Direction computation is wrong in Base Mode
SuminCho1 Mar 28, 2025
82e5079
Improve APV tests
pigselated Mar 28, 2025
fca7d75
Minor RenderGraph Viewer bugfixes
arttu-peltonen Mar 28, 2025
d460399
Use Visible Triangle Mesh in Post Processing
aquadragon3d Mar 28, 2025
4f521c5
Graphics/sg/appendnode
RemyUnity Mar 28, 2025
5eb4e98
[APV] Fix NullReferenceException when baking multiple APVs with terra…
pmavridis Mar 28, 2025
abba3ad
Fix typo
ocarrere Mar 28, 2025
ded1959
[ShaderGraph] properly add SHADERGRAPH_PREVIEW_MAIN to main preview s…
Mar 29, 2025
8e0839a
[URP] Fix reflection probes for Deferred+
Mar 31, 2025
c6f6b6a
Fix RenderGraph Cleanup() public API to avoid corrupting RenderGraph …
axoloto Mar 31, 2025
ab66431
[VFX] Disable Indirect Draw checkbox if the system does not have an u…
gabrieldelacruz Mar 31, 2025
042de23
Deduplicate 'GPUDriven' and 'XR' URP Jobs
giorgospetkakis Mar 31, 2025
3d15a23
[SRPF] Unified VFXHelpUrl attribute
kirill-titov-u Apr 1, 2025
e1adba4
Baking, then deleting baking set asset, then rebaking causes exceptio…
SuminCho1 Apr 1, 2025
8b60d19
Graphics/SRP - Improve URP ScriptableRendererFeature Template
axoloto Apr 1, 2025
e600a15
Reference the embedded test framework in SRP Test Projects
giorgospetkakis Apr 1, 2025
4b8bdd7
Fix case UUM-101780.
IonutNedelcuUnity Apr 1, 2025
8e65cb3
Accessibility: various files and SVG to text
ocarrere Apr 2, 2025
e3e5d66
Graphics/bugfix/gizmo to unsafe pass
Charles-H-Unity Apr 2, 2025
4b2fd4f
Add APV Sky Occlusion Testing
pigselated Apr 2, 2025
f3d659a
[srp] added casts ot int of CubeMapFaceID where needed
alexey-unity Apr 2, 2025
aa1ef11
[APV] Fix warning when baking APV with zero occlusion data
pmavridis Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An Environment Library is an Asset that contains a list of environments that you

<a name="Creation"></a>

![](Images/LookDevEnvironmentLibrary1.png)
![Environment Library asset.](Images/LookDevEnvironmentLibrary1.png)

## Creating an Environment Library

Expand All @@ -26,13 +26,13 @@ To add, remove, or duplicate environments, use the toolbar at the bottom of the

| **Button** | **Function** | **Description** |
| ------------------------------------------------------------ | ------------- | ------------------------------------------------------------ |
| ![](Images/LookDevEnvironmentLibrary2.png) | **Add** | Click this button to add a new environment to the bottom of the list. |
| ![](Images/LookDevEnvironmentLibrary3.png) | **Remove** | Click this button to remove the environment currently selected. Note that the environment that you have selected is the one with the blue frame. |
| ![](Images/LookDevEnvironmentLibrary4.png) | **Duplicate** | Click this button to duplicate the currently selected environment and add it as a new environment to the bottom of the list. |
| ![This button adds a new environment to the bottom of the list.](Images/LookDevEnvironmentLibrary2.png) | **Add** | Click this button to add a new environment to the bottom of the list. |
| ![This button removes the currently selected environment.](Images/LookDevEnvironmentLibrary3.png) | **Remove** | Click this button to remove the environment currently selected. Note that the environment that you have selected is the one with the blue frame. |
| ![This button duplicates the currently selected environment.](Images/LookDevEnvironmentLibrary4.png) | **Duplicate** | Click this button to duplicate the currently selected environment and add it as a new environment to the bottom of the list. |

## Properties

![](Images/LookDevEnvironmentLibrary5.png)
![Environment Library properties](Images/LookDevEnvironmentLibrary5.png)

| **Property** | **Description** |
| ------------------- | ------------------------------------------------------------ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ Use the toolbar in the top-left of the window to change which viewing mode Look

### Single viewport

![](Images/LookDev1.png)
![Buttons for switching between viewports 1 and 2.](Images/LookDev1.png)

By default, Look Dev displays a single viewport which contains the Prefab or GameObject you are working with. If you are in another viewing mode, you can click either the number **1** or number **2** button to go back to single view. Each button corresponds to a viewport in Look Dev. Select button **1** to use viewport 1, and button 2 to use viewport **2**.

<a name="MultiView"></a>

### Multi-viewport

![](Images/LookDev2.png)
![Buttons for changing the multi-viewport mode.](Images/LookDev2.png)

Use multiple viewports to compare different environments and settings for the same Asset. You can arrange viewports:

Expand All @@ -73,23 +73,21 @@ When using multiple viewports, it only makes sense to compare different Prefabs

Vertical and horizontal side-by-side viewports show an identical view of your Asset.

![](Images/LookDev3.png)
![Vertical side-by-side viewport view.](Images/LookDev3.png)

##### Split-screen

In a split-screen view, there is a red/blue manipulation Gizmo that separates the two viewports. For information on how to use this Gizmo, see [Using the manipulation Gizmo](#ManipulationGizmo).

![](Images/LookDev4.png)
![Split-screen viewport view.](Images/LookDev4.png)

#### Multi-viewport Camera

By default, Look Dev synchronizes the camera movement for both views. To decouple the Cameras from one another, and manipulate them independently, click the **Synchronized Cameras** button in-between the two numbered Camera buttons.

![](Images/LookDev5.png)

To align the cameras with each other, or reset them, click on the drop-down arrow next to the viewport **2** icon:

![](Images/LookDev6.png)
![Drop-down options of multi-viewport cameras.](Images/LookDev6.png)

<a name="ManipulationGizmo"></a>

Expand All @@ -101,13 +99,11 @@ The manipulation Gizmo represents the separation plane between the two viewports

To move the separator, click and drag the straight line of the Gizmo to the location you want.

![](Images/LookDev7.png)

#### Changing the orientation and length

To change the orientation and length of the manipulator Gizmo, click and drag the circle at either end of the manipulator. Changing the length of the Gizmo lets you set the orientation and [blending](#Blending) values more precisely.

![](Images/LookDev8.png))
![Click and drag the circle at either end of the gizmo to change its orientation and length.](Images/LookDev8.png)

#### Changing the split in increments

Expand All @@ -121,7 +117,7 @@ The central white circle on the separator allows you to blend between the two vi

The white circle automatically snaps back into the center when you drag it back. This helps you get back to the default blending value quickly.

![](Images/LookDev9.png)
![The white circle on the separator lets you change the blending behavior.](Images/LookDev9.png)

### HDRI environments in Look Dev

Expand Down
123 changes: 73 additions & 50 deletions Packages/com.unity.render-pipelines.core/Editor/HeaderFoldout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ namespace UnityEditor.Rendering
public partial class HeaderFoldout : Foldout
{
const string k_StylesheetPathFormat = "Packages/com.unity.render-pipelines.core/Editor/StyleSheets/HeaderFoldout{0}.uss";
const string k_Class = "header-foldout";
const string k_IconName = "header-foldout__icon";
const string k_MainClass = "header-foldout";
const string k_EnableClass = k_MainClass + "__enable";
const string k_IconClass = k_MainClass + "__icon";
const string k_LabelClass = k_MainClass + "__label";
const string k_HelpButtonClass = k_MainClass + "__help-button";
const string k_ContextButtonClass = k_MainClass + "__context-button";

private string m_DocumentationURL;
private Texture2D m_Icon;
private Func<GenericMenu> m_ContextMenuGenerator;
private VisualElement m_HelpButton;
private VisualElement m_ContextMenuButton;
private VisualElement m_IconElement;
private Toggle m_Toggle;
private Label m_Text;

/// <summary>URL to use on documentation icon. If null, button don't show.</summary>
public string documentationURL
Expand Down Expand Up @@ -61,92 +67,109 @@ public Texture2D icon
m_IconElement.style.display = m_Icon != null ? DisplayStyle.Flex : DisplayStyle.None;
}
}

/// <summary>Property to get the enablement state</summary>
public bool enabled
{
get => m_Toggle.value;
set => m_Toggle.value = value;
}

/// <summary>Property to get the enablement visibility state</summary>
public bool showEnableCheckbox
{
get => m_Toggle.style.display == DisplayStyle.Flex;
set => m_Toggle.style.display = value ? DisplayStyle.Flex : DisplayStyle.None;
}

/// <summary>Quick access to the enable toggle if one need to register events</summary>
public Toggle enableToggle => m_Toggle;

/// <summary>Property to get the title</summary>
public new string text
{
get => m_Text.text;
set => m_Text.text = value;
}

/// <summary>Constructor</summary>
public HeaderFoldout() : base()
{
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(string.Format(k_StylesheetPathFormat, "")));
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(string.Format(k_StylesheetPathFormat, EditorGUIUtility.isProSkin ? "Dark" : "Light")));
AddToClassList(k_Class);
AddToClassList(k_MainClass);

RegisterCallback<AttachToPanelEvent>(DelayedInit);

var line = hierarchy[0][0]; //pass by herarchy to ignore content redirection

m_IconElement = new Image()
{
style =
{
display = DisplayStyle.None // hidden by default, will be enabled if icon is set
}
};
m_IconElement.AddToClassList(k_IconClass);
line.Add(m_IconElement);

m_Toggle = new Toggle()
{
value = true
};
m_Toggle.AddToClassList(k_EnableClass);
m_Toggle.RegisterValueChangedCallback(HandleDisabling);
m_Toggle.style.display = DisplayStyle.None; // hidden by default
line.Add(m_Toggle);

m_Text = new Label();
m_Text.AddToClassList(k_LabelClass);
line.Add(m_Text);

m_HelpButton = new Button(Background.FromTexture2D(CoreEditorStyles.iconHelp), () => Help.BrowseURL(m_DocumentationURL));
m_HelpButton.AddToClassList(k_HelpButtonClass);
m_HelpButton.SetEnabled(!string.IsNullOrEmpty(m_DocumentationURL));
line.Add(m_HelpButton);

m_ContextMenuButton =
new Button(Background.FromTexture2D(CoreEditorStyles.paneOptionsIcon), () => ShowMenu())
{
style =
{
paddingRight = 2
}
};

m_ContextMenuButton = new Button(Background.FromTexture2D(CoreEditorStyles.paneOptionsIcon), () => ShowMenu());
m_ContextMenuButton.AddToClassList(k_ContextButtonClass);
m_ContextMenuButton.SetEnabled(m_ContextMenuGenerator != null);
line.Add(m_ContextMenuButton);

m_IconElement = new Image();
m_IconElement.name = k_IconName;
m_IconElement.style.display = DisplayStyle.None; // Disable by default, will be enabled if icon is set
// Delay insertion of icon to happen after foldout is constructed so we can put it in the right place
RegisterCallbackOnce<AttachToPanelEvent>(evt => line.Insert(1, m_IconElement));
}

void DelayedInit(AttachToPanelEvent evt)
{
//Only show top line if previous item is not a HeaderFoldout to avoid bolder border
bool shouldShowTopLine = true;
var parent = hierarchy.parent;
int posInParent = parent.hierarchy.IndexOf(this);
if (posInParent > 0 && parent[posInParent - 1].ClassListContains(k_Class))
shouldShowTopLine = false;
if (posInParent == 0 || !parent[posInParent - 1].ClassListContains(k_MainClass))
AddToClassList("first-in-collection");

style.borderTopWidth = shouldShowTopLine ? 1 : 0;
//fix to transfer label assigned in UXML from base label to new label
if (!string.IsNullOrEmpty(base.text))
{
if (string.IsNullOrEmpty(m_Text.text))
m_Text.text = base.text;
base.text = null;
}
}

void ShowMenu()
{
var menu = m_ContextMenuGenerator.Invoke();
menu.DropDown(new Rect(m_ContextMenuButton.worldBound.position + m_ContextMenuButton.worldBound.size.y * Vector2.up, Vector2.zero));
}

void HandleDisabling(ChangeEvent<bool> evt)
=> contentContainer.SetEnabled(evt.newValue);
}

/// <summary> UITK component to display header styled foldout. This variant have an enable checkbox.</summary>
[Obsolete("Please directly use HeaderFoldout now #from(6000.2) (UnityUpgradable) -> HeaderFoldout", false)]
public class HeaderToggleFoldout : HeaderFoldout
{
private Toggle m_Toggle;

/// <summary>Property to get the enablement state</summary>
public bool enabled
{
get => m_Toggle.value;
set => m_Toggle.value = value;
}

/// <summary>Quick access to the enable toggle if one need to register events</summary>
public Toggle enableToggle => m_Toggle;

/// <summary>Constructor</summary>
public HeaderToggleFoldout() : base()
{
var line = hierarchy[0][0]; //pass by herarchy to ignore content redirection
m_Toggle = new Toggle()
{
value = true,
name = "enable-checkbox",
};

//Need to delay insertion as foldout will be constructed after and we need to squeeze rigth after
RegisterCallbackOnce<AttachToPanelEvent>(evt => line.Insert(1, m_Toggle));

m_Toggle.RegisterValueChangedCallback(HandleDisabling);
}

void HandleDisabling(ChangeEvent<bool> evt)
=> contentContainer.SetEnabled(evt.newValue);
=> showEnableCheckbox = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,11 @@ unsafe static void WriteBakingCells(BakingCell[] bakingCells)

AssetDatabase.ImportAsset(cellDataFilename);
AssetDatabase.ImportAsset(cellOptionalDataFilename);
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
// If we did not write a probe occlusion file (because it was zero bytes), don't try to load it (UUM-101480)
if (probeOcclusion.Length > 0)
{
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
}
AssetDatabase.ImportAsset(cellBricksDataFilename);
AssetDatabase.ImportAsset(cellSharedDataFilename);
AssetDatabase.ImportAsset(cellSupportDataFilename);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ void BakingGUI()
{
if (newSet != null) { EditorUtility.SetDirty(newSet); newSet.singleSceneMode = false; }
activeSet = newSet;

ProbeReferenceVolume.instance.Clear();
ProbeReferenceVolume.instance.SetActiveBakingSet(activeSet);
}

Expand Down Expand Up @@ -525,7 +527,7 @@ void UseTemporaryBakingSet(string sceneGUID, ProbeVolumeBakingSet set = null)
set = ScriptableObject.CreateInstance<ProbeVolumeBakingSet>();
set.SetDefaults();

ProbeReferenceVolume.instance.AddPendingSceneRemoval(sceneGUID);
ProbeReferenceVolume.instance.Clear();
}

EditorUtility.SetDirty(set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public static bool BeginGroup(AnimFloat animation = null)

animation ??= s_AnimFloat;

GUI.color = Color.Lerp(CoreEditorStyles.backgroundColor * oldColor, CoreEditorStyles.backgroundHighlightColor, animation.value);
Color transparent = CoreEditorStyles.backgroundHighlightColor;
transparent.a = 0f;

GUI.color = Color.Lerp(transparent, CoreEditorStyles.backgroundHighlightColor, animation.value);
EditorGUILayout.BeginVertical(CoreEditorStyles.additionalPropertiesHighlightStyle);
GUI.color = oldColor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ void InitializeSidePanel()
rootVisualElement.RegisterCallback<GeometryChangedEvent>(_ =>
{
SaveSplitViewFixedPaneHeight(); // Window resized - save the current pane height
UpdatePanelHeights();

// TwoPaneSplitView also updates draglineanchor offset using the same event, conflicting with what we
// do here. Deferring our panel height update to next frame solves a bug with dragline "jumping" when
// window is resized down vertically and the lower panel is already at minimum height.
rootVisualElement.schedule.Execute(UpdatePanelHeights);
});

var contentSplitView = rootVisualElement.Q<TwoPaneSplitView>(Names.kContentContainer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static partial class Names
public const string kGridlineContainer = "grid-line-container";
public const string kHoverOverlay = "hover-overlay";
public const string kEmptyStateMessage = "empty-state-message";
public const string kPassListCornerOccluder = "pass-list-corner-occluder";
}

static partial class Classes
Expand Down Expand Up @@ -191,6 +192,7 @@ static void Init()
{
var window = GetWindow<RenderGraphViewer>();
window.titleContent = new GUIContent("Render Graph Viewer");
window.minSize = new Vector2(880f, 300f);
}

[Flags]
Expand Down Expand Up @@ -1817,6 +1819,27 @@ void RebuildUI()
RebuildGraphViewerUI();
}

void RerouteWheelEvent(VisualElement source, VisualElement target)
{
source.RegisterCallback<WheelEvent>(evt =>
{
evt.StopImmediatePropagation();

// Need to create an intermediate Event to be able to call WheelEvent.GetPooled()
var imguiEvt = new Event {
type = EventType.ScrollWheel,
delta = new Vector2(evt.delta.x, evt.delta.y),
mousePosition = evt.mousePosition,
modifiers = evt.modifiers
};
using (var newEvt = WheelEvent.GetPooled(imguiEvt))
{
newEvt.target = target;
target.SendEvent(newEvt);
}
}, TrickleDown.TrickleDown);
}

// Initialize, register callbacks & manipulators etc. once
void InitializePersistentElements()
{
Expand Down Expand Up @@ -1881,9 +1904,12 @@ void InitializePersistentElements()
resourceGridScrollView.horizontalScroller.valueChanged += value =>
passListScrollView.scrollOffset = new Vector2(value, passListScrollView.scrollOffset.y);

// Disable mouse wheel on the scroll views that are synced to the resource grid
resourceListScrollView.RegisterCallback<WheelEvent>(evt => evt.StopImmediatePropagation(), TrickleDown.TrickleDown);
passListScrollView.RegisterCallback<WheelEvent>(evt => evt.StopImmediatePropagation(), TrickleDown.TrickleDown);
// Scroll views are synced to the resource grid, so we don't want them to scroll independently. To have
// consistent behavior, redirect the wheel events to the resource grid and let it handle them.
RerouteWheelEvent(resourceListScrollView, resourceGridScrollView);
RerouteWheelEvent(passListScrollView, resourceGridScrollView);
var passListCornerOccluder = rootVisualElement.Q<VisualElement>(Names.kPassListCornerOccluder);
RerouteWheelEvent(passListCornerOccluder, resourceGridScrollView);

InitializeSidePanel();
}
Expand Down
Loading