Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
91c9ebd
[Backport 6000.3] Show warning when VisualElement material is not com…
ncerone-unity Jan 22, 2026
fd1acc4
[Port][6000.3] Fix for shaders to be compliant with HLSL 2021
Adrian1066 Jan 22, 2026
d552fcc
[Port] [6000.3] Create a dummy color for binding when MSAA samples mi…
svc-reach-platform-support Jan 25, 2026
9cfc8b2
[Port] [6000.3] Partially revert a PR #81816 and register debug data …
svc-reach-platform-support Jan 25, 2026
e19f772
[Port] [6000.3] docg-8262: Fix typo
svc-reach-platform-support Jan 25, 2026
d1f07f8
[Port] [6000.3] Fix SampleDependencyImporter errors when opening/clos…
svc-reach-platform-support Jan 25, 2026
7aa0dde
[Port] [6000.3] [UUM-132809] Fix naming in add component menu and Gam…
svc-reach-platform-support Jan 26, 2026
c94a603
[Port] [6000.3] [HDRP] Fix water height sampling when distant wind sp…
svc-reach-platform-support Jan 26, 2026
e3bca0d
[Port] [6000.3] 2d/bugfix/uum 127937
svc-reach-platform-support Jan 27, 2026
0b8e4e9
[Port] [6000.3] [HDRP] Fix water decal sampling in Sample Water Surfa…
svc-reach-platform-support Jan 27, 2026
174c189
[Port] [6000.3] DOCG-7285: Improve clarity on Sample Texture 2D node …
svc-reach-platform-support Jan 30, 2026
c97cfc9
[Port] [6000.3] docg-8241: clarify blank normal map for Normal Streng…
svc-reach-platform-support Jan 30, 2026
bb2e5f1
[Port] [6000.3] [ShaderGraph] Fix swizzle mask regression plus some o…
svc-reach-platform-support Feb 3, 2026
b363c2a
[6000.3] Update UI Test Framework package version to 6.3.0 for Unity 6.3
esther-ugolini Feb 4, 2026
8550929
[Port] [6000.3] Resolve Vulkan define redefinition error.
svc-reach-platform-support Feb 4, 2026
9329c78
[Port] [6000.3] docg-8349: Resolve duplicate handler entry by renamin…
svc-reach-platform-support Feb 6, 2026
50cc14a
[Port] [6000.3] [URP] Add option to control inclusion of terrain shad…
SouravUnity Feb 9, 2026
5a5cddd
[Port] [6000.3] [HDRP] Fix buiding a player with the water sample in …
svc-reach-platform-support Feb 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ VisualElement panelRoot
{
get
{
_panelRoot ??= injectingElement.panel.visualTree;
_panelRoot ??= injectingElement?.panel?.visualTree;
return _panelRoot;
}
}
Expand Down Expand Up @@ -82,11 +82,11 @@ VisualElement IPackageManagerExtension.CreateExtensionUI()

void RefreshSampleButtons()
{
if (injectingElement == null || m_PackageInfo == null || m_SampleList == null)
if (injectingElement == null || m_PackageInfo == null || m_SampleList == null || panelRoot == null)
return;

// Call refresh of samples and button injection when switching to the "Samples" tab.
if (samplesButton == null )
if (samplesButton == null)
{
samplesButton = panelRoot.Q<Button>(name: samplesButtonName);
if (samplesButton != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ private void Reset()
/// <param name="settings"><see cref="IDebugDisplaySettings"/> to be registered</param>
public void RegisterDebug(IDebugDisplaySettings settings)
{
#if UNITY_EDITOR
if (UnityEditor.BuildPipeline.isBuildingPlayer)
return;
#endif
DebugManager debugManager = DebugManager.instance;
List<IDebugDisplaySettingsPanelDisposable> panels = new List<IDebugDisplaySettingsPanelDisposable>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;

public class InstallPackage : MonoBehaviour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ However there are several simulations that are important to be aware of.
As the water surface gameobject is saved inside a scene, and the VFX graph is an asset on disk, it is not possible to directly reference the surface from within the graph. This means data of the water surface need to be set globally by the user before the VFX can sample the water.
As a result, only a single surface can be sampled from any VFX Graph at any given time.

Additionally, the settings on the Sample node in the VFX Graph needs to be set according to what water surfaces will be bound globally at runtime. This inclues setting the proper **Surface Type** and enabling **Include Current** if a current map is assigned on the water surface.
Additionally, the settings on the Sample node in the VFX Graph needs to be set according to what water surfaces will be bound globally at runtime. This includes setting the proper **Surface Type** and enabling **Include Current** if a current map is assigned on the water surface.
The **Evaluate Ripples** needs to be disabled if the surface doesn't have ripples, but can be disabled on purpose for performance reasons even if the surface has ripplies, at the cost of slighly lower precision in the results. The same applies to the **Include Deformation** option.
Finally, to ensure proper masking is applied, the option **Use Mask and Current Water Decals Workflow** must be set to match the **Enable Mask And Current Water Decals** setting in the Graphics settings.


The following script can be used to bind the relevant textures in the global scope, so that the VFX Graph can access them.
Alternatively, can also use the more complete script WaterSurfaceBindVFXEditor.cs, located in the HDRP Package Manager Water samples.
```
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;

public class WaterSurfaceBinder : MonoBehaviour
{
public WaterSurface waterSurface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class SampleWaterSurface : VFXOperator
[VFXSetting(VFXSettingAttribute.VisibleFlags.Default)]
[Tooltip("Specifies if the search should sample the current map.")]
protected bool includeCurrent = false;
[VFXSetting(VFXSettingAttribute.VisibleFlags.Default)]
[Tooltip("Specifies if the system use mask and current water decal workflow. This has to be set in accordance with the same checkbox in the Graphics Settings.")]
protected bool useMaskAndCurrentWaterDecalsWorkflow = false;

public class InputProperties
{
Expand Down Expand Up @@ -107,6 +110,9 @@ protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputE
if (!includeDeformation) baseCode += "#define IGNORE_WATER_DEFORMATION\n";
if (includeCurrent) baseCode += "#define WATER_LOCAL_CURRENT\n";

// We need this because water decals can attenuate frequency bands using a water mask when Mask and Current Water Decals workflow is enabled.
if (useMaskAndCurrentWaterDecalsWorkflow) baseCode += "#define WATER_DECAL_COMPLETE\n";

baseCode += $"#include \"{m_SampleWaterSurface}\"\n";

string FindVerticalDisplacements = $"float error; int steps; float3 normal; float2 current; float height = FindVerticalDisplacement(positionWS, {maxIterations}, {error.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture)}, steps, error, normal, current);";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2125,11 +2125,6 @@ void UnregisterRenderingDebug()

internal void RegisterDebug()
{
#if UNITY_EDITOR
if (UnityEditor.BuildPipeline.isBuildingPlayer)
return;
#endif

RegisterMaterialDebug();
RegisterLightingDebug();
RegisterRenderingDebug();
Expand All @@ -2149,7 +2144,7 @@ void UnregisterDebugItems(string panelName, DebugUI.Widget[] items)
{
if (items == null || items.Length == 0)
return;

var panel = DebugManager.instance.GetPanel(panelName);
if (panel != null)
panel.children.Remove(items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static WaterSimulationTapData EvaluateDisplacementData(WaterSimSearchData wsd, f
EvaluateSimulationDisplacement(wsd, currentLocation, includeSimulation, out data.horizontalDisplacement, out data.direction, out data.verticalDisplacements);

// Evaluate the distance to the reference point
data.offset = (currentLocation.xz + data.horizontalDisplacement) - referencePosition.xz;
data.offset = currentLocation.xz - referencePosition.xz;
data.distance = length(data.offset);

return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ TapData EvaluateDisplacementData(float3 currentLocation, float3 referencePositio
EvaluateSimulationDisplacement(currentLocation, data.horizontalDisplacement, data.verticalDisplacements);

// Evaluate the distance to the reference point
data.offset = (currentLocation.xz + data.horizontalDisplacement) - referencePosition.xz;
data.offset = currentLocation.xz - referencePosition.xz;
data.distance = length(data.offset);

return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEditor.PackageManager.Requests;
using UnityEditor.PackageManager;
#if SPLINE_PACKAGE_INSTALLED
using UnityEditor.Splines;
using UnityEngine.Splines;
#if UNITY_EDITOR
using UnityEditor.Splines;
#endif
using UnityEngine.Splines;
#endif

[ExecuteInEditMode]
Expand Down Expand Up @@ -51,7 +51,7 @@ void OnEnable()

void HookCallbacks()
{
#if SPLINE_PACKAGE_INSTALLED
#if SPLINE_PACKAGE_INSTALLED && UNITY_EDITOR
if (splineContainer != null)
foreach (Spline spline in splineContainer.Splines)
EditorSplineUtility.AfterSplineWasModified += OnAfterSplineWasModified;
Expand All @@ -60,7 +60,7 @@ void HookCallbacks()

void UnhookCallbacks()
{
#if SPLINE_PACKAGE_INSTALLED
#if SPLINE_PACKAGE_INSTALLED && UNITY_EDITOR
if (splineContainer != null)
foreach (Spline spline in splineContainer.Splines)
EditorSplineUtility.AfterSplineWasModified -= OnAfterSplineWasModified;
Expand Down Expand Up @@ -308,6 +308,8 @@ public void RunCompute()
#endif
}
}

#if UNITY_EDITOR
public void OpenDialogAndSaveCurrentMap()
{
var path = EditorUtility.SaveFilePanel("Save current map", "","currentMap","png");
Expand All @@ -329,6 +331,7 @@ public static void SaveTextureOnDisk(RenderTexture renderTexture, string path)
File.WriteAllBytes(path, bytesHeight);
AssetDatabase.Refresh();
}
#endif

public static Texture2D ToTexture2D(RenderTexture rTex)
{
Expand Down
Loading