Skip to content

Commit

Permalink
com.unity.render-pipelines.core@12.0.0 in Unity 2021.2.0b15
Browse files Browse the repository at this point in the history
## [12.0.0] - 2021-01-11

### Added
- Support for the PlayStation 5 platform has been added.
- Support for additional properties for Volume Components without custom editor
- Added VolumeComponentMenuForRenderPipelineAttribute to specify a volume component only for certain RenderPipelines.
- Calculating correct rtHandleScale by considering the possible pixel rounding when DRS is on
- Support for the PlayStation 5 platform has been added.
- Support for the XboxSeries platform has been added.
- Added Editor window that allow showing an icon to browse the documentation
- New method DrawHeaders for VolumeComponentsEditors
- Unification of Material Editor Headers Scopes
- New API functions with no side effects in DynamicResolutionHandler, to retrieve resolved drs scale and to apply DRS on a size.
- Added helper for Volumes (Enable All Overrides, Disable All Overrides, Remove All Overrides).
- Added a blitter utility class. Moved from HDRP to RP core.
- Added a realtime 2D texture atlas utility classes. Moved from HDRP to RP core.
- New methods on CoreEditorDrawers, to allow adding a label on a group before rendering the internal drawers
- Method to generate a Texture2D of 1x1 with a plain color
- Red, Green, Blue Texture2D on CoreEditorStyles
- New API in DynamicResolutionHandler to handle multicamera rendering for hardware mode. Changing cameras and resetting scaling per camera should be safe.
- Added SpeedTree8MaterialUpgrader, which provides utilities for upgrading and importing SpeedTree 8 assets to scriptable render pipelines.
- Adding documentation links to Light Sections
- Support for Lens Flare Data Driven (from images and Procedural shapes), on HDRP
- New SRPLensFlareData Asset
- Adding documentation links to Light Sections.
- Added sampling noise to probe volume sampling position to hide seams between subdivision levels.
- Added DebugUI.Foldout.isHeader property to allow creating full-width header foldouts in Rendering Debugger.
- Added DebugUI.Flags.IsHidden to allow conditional display of widgets in Rendering Debugger.
- Added "Expand/Collapse All" buttons to Rendering Debugger window menu.
- Added mouse & touch input support for Rendering Debugger runtime UI, and fix problems when InputSystem package is used.
- Add automatic spaces to enum display names used in Rendering Debugger and add support for InspectorNameAttribute.
- Adding new API functions inside DynamicResolutionHandler to get mip bias. This allows dynamic resolution scaling applying a bias on the frame to improve on texture sampling detail.
- Added a reminder if the data of probe volume might be obsolete.
- Added new API function inside DynamicResolutionHandler and new settings in GlobalDynamicResolutionSettings to control low res transparency thresholds. This should help visuals when the screen percentage is too low.
- Added common include file for meta pass functionality (case 1211436)
- Added OverridablePropertyScope (for VolumeComponentEditor child class only) to handle the Additional Property, the override checkbox and disable display and decorator attributes in one scope.
- Added IndentLevelScope (for VolumeComponentEditor child class only) to handle indentation of the field and the checkbox.
- Added an option to change the visibilty of the Volumes Gizmos (Solid, Wireframe, Everything), available at Preferences > Core Render Pipeline
- Added class for drawing shadow cascades `UnityEditor.Rendering.ShadowCascadeGUI.DrawShadowCascades`.
- Added UNITY_PREV_MATRIX_M and UNITY_PREV_MATRIX_I_M shader macros to support instanced motion vector rendering
- Added new API to customize the rtHandleProperties of a particular RTHandle. This is a temporary work around to assist with viewport setup of Custom post process when dealing with DLSS or TAAU
- Added `IAdditionalData` interface to identify the additional datas on the core package.

### Fixed
- Help boxes with fix buttons do not crop the label.
- Fixed missing warning UI about Projector component being unsupported (case 1300327).
- Fixed the display name of a Volume Parameter when is defined the attribute InspectorName
- Calculating correct rtHandleScale by considering the possible pixel rounding when DRS is on
- Problem on domain reload of Volume Parameter Ranges and UI values
- Fixed Right Align of additional properties on Volume Components Editors
- Fixed normal bias field of reference volume being wrong until the profile UI was displayed.
- Fixed L2 for Probe Volumes.
- When adding Overrides to the Volume Profile, only show Volume Components from the current Pipeline.
- Fixed assertion on compression of L1 coefficients for Probe Volume.
- Explicit half precision not working even when Unified Shader Precision Model is enabled.
- Fixed ACES filter artefact due to half float error on some mobile platforms.
- Fixed issue displaying a warning of different probe reference volume profiles even when they are equivalent.
- Fixed missing increment/decrement controls from DebugUIIntField & DebugUIUIntField widget prefabs.
- Fixed IES Importer related to new API on core.
- Fixed a large, visible stretch ratio in a LensFlare Image thumbnail.
- Fixed Undo from script refreshing thumbnail.
- Fixed cropped thumbnail for Image with non-uniform scale and rotation
- Skip wind calculations for Speed Tree 8 when wind vector is zero (case 1343002)
- Fixed memory leak when changing SRP pipeline settings, and having the player in pause mode.
- Fixed alignment in Volume Components
- Virtual Texturing fallback texture sampling code correctly honors the enableGlobalMipBias when virtual texturing is disabled.
- Fixed LightAnchor too much error message, became a HelpBox on the Inspector.
- Fixed library function SurfaceGradientFromTriplanarProjection to match the mapping convention used in SampleUVMappingNormalInternal.hlsl and fix its description.
- Fixed Volume Gizmo size when rescaling parent GameObject
- Fixed rotation issue now all flare rotate on positive direction (1348570)
- Fixed error when change Lens Flare Element Count followed by undo (1346894)
- Fixed Lens Flare Thumbnails
- Fixed Lens Flare 'radialScreenAttenuationCurve invisible'
- Fixed Lens Flare rotation for Curve Distribution
- Fixed potentially conflicting runtime Rendering Debugger UI command by adding an option to disable runtime UI altogether (1345783).
- Fixed Lens Flare position for celestial at very far camera distances. It now locks correctly into the celestial position regardless of camera distance (1363291)
- Fixed issues caused by automatically added EventSystem component, required to support Rendering Debugger Runtime UI input. (1361901)
- Fixed API to draw color temperature for Lights.

### Changed
- Improved the warning messages for Volumes and their Colliders.
- Changed Window/Render Pipeline/Render Pipeline Debug to Window/Analysis/Rendering Debugger
- Changed Window/Render Pipeline/Look Dev to Window/Analysis/Look Dev
- Changed Window/Render Pipeline/Render Graph Viewer to Window/Analysis/Render Graph Viewer
- Changed Window/Render Pipeline/Graphics Compositor to Window/Rendering/Graphics Compositor
- Volume Gizmo Color setting is now under Colors->Scene->Volume Gizmo
- Volume Gizmo alpha changed from 0.5 to 0.125
- Moved Edit/Render Pipeline/Generate Shader Includes to Edit/Rendering/Generate Shader Includes
- Moved Assets/Create/LookDev/Environment Library to Assets/Create/Rendering/Environment Library (Look Dev)
- Changed Nintendo Switch specific half float fixes in color conversion routines to all platforms.
- Improved load asset time for probe volumes.
- ClearFlag.Depth does not implicitely clear stencil anymore. ClearFlag.Stencil added.
- The RTHandleSystem no longer requires a specific number of sample for MSAA textures. Number of samples can be chosen independently for all textures.
- Platform ShaderLibrary API headers now have a new macro layer for 2d texture sampling macros. This layer starts with PLATFORM_SAMPLE2D definition, and it gives the possibility of injecting sampling behavior on a render pipeline level. For example: being able to a global mip bias for temporal upscalers.
- Update icon for IES, LightAnchor and LensFlare
- LensFlare (SRP) can be now disabled per element
- LensFlare (SRP) tooltips now refer to meters.
- Serialize the Probe Volume asset as binary to improve footprint on disk and loading speed.
- LensFlare Element editor now have Thumbnail preview
- Improved IntegrateLDCharlie() to use uniform stratified sampling for faster convergence towards the ground truth
- DynamicResolutionHandler.GetScaledSize function now clamps, and never allows to return a size greater than its input.
- Removed DYNAMIC_RESOLUTION snippet on lens flare common shader. Its not necessary any more on HDRP, which simplifies the shader.
- Made occlusion Radius for lens flares in directional lights, be independant of the camera's far plane.
  • Loading branch information
Unity Technologies committed Sep 30, 2021
1 parent 20464ae commit f2acfae
Show file tree
Hide file tree
Showing 65 changed files with 8,551 additions and 694 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added class for drawing shadow cascades `UnityEditor.Rendering.ShadowCascadeGUI.DrawShadowCascades`.
- Added UNITY_PREV_MATRIX_M and UNITY_PREV_MATRIX_I_M shader macros to support instanced motion vector rendering
- Added new API to customize the rtHandleProperties of a particular RTHandle. This is a temporary work around to assist with viewport setup of Custom post process when dealing with DLSS or TAAU
- Added `IAdditionalData` interface to identify the additional datas on the core package.

### Fixed
- Help boxes with fix buttons do not crop the label.
Expand Down Expand Up @@ -78,6 +79,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed Lens Flare 'radialScreenAttenuationCurve invisible'
- Fixed Lens Flare rotation for Curve Distribution
- Fixed potentially conflicting runtime Rendering Debugger UI command by adding an option to disable runtime UI altogether (1345783).
- Fixed Lens Flare position for celestial at very far camera distances. It now locks correctly into the celestial position regardless of camera distance (1363291)
- Fixed issues caused by automatically added EventSystem component, required to support Rendering Debugger Runtime UI input. (1361901)
- Fixed API to draw color temperature for Lights.

### Changed
- Improved the warning messages for Volumes and their Colliders.
Expand All @@ -102,6 +106,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Improved IntegrateLDCharlie() to use uniform stratified sampling for faster convergence towards the ground truth
- DynamicResolutionHandler.GetScaledSize function now clamps, and never allows to return a size greater than its input.
- Removed DYNAMIC_RESOLUTION snippet on lens flare common shader. Its not necessary any more on HDRP, which simplifies the shader.
- Made occlusion Radius for lens flares in directional lights, be independant of the camera's far plane.

## [11.0.0] - 2020-10-21

Expand Down
160 changes: 125 additions & 35 deletions Editor/ContextualMenuDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,115 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

using UnityEngine.Rendering;

namespace UnityEditor.Rendering
{
internal static class RemoveComponentUtils
{
public static IEnumerable<Component> ComponentDependencies(Component component)
=> component.gameObject
.GetComponents<Component>()
.Where(c => c != component
&& c.GetType()
.GetCustomAttributes(typeof(RequireComponent), true)
.Count(att => att is RequireComponent rc
&& (rc.m_Type0 == component.GetType()
|| rc.m_Type1 == component.GetType()
|| rc.m_Type2 == component.GetType())) > 0);

public static bool CanRemoveComponent(Component component, IEnumerable<Component> dependencies)
{
if (dependencies.Count() == 0)
return true;

Component firstDependency = dependencies.First();
string error = $"Can't remove {component.GetType().Name} because {firstDependency.GetType().Name} depends on it.";
EditorUtility.DisplayDialog("Can't remove component", error, "Ok");
return false;
}
}

/// <summary>
/// Helper methods for overriding contextual menus
/// </summary>
static class ContextualMenuDispatcher
{
[MenuItem("CONTEXT/ReflectionProbe/Remove Component")]
static void RemoveReflectionProbeComponent(MenuCommand command)
{
RemoveComponent<ReflectionProbe>(command);
}

[MenuItem("CONTEXT/Light/Remove Component")]
static void RemoveLightComponent(MenuCommand command)
{
RemoveComponent<Light>(command);
}

[MenuItem("CONTEXT/Camera/Remove Component")]
static void RemoveCameraComponent(MenuCommand command)
{
Camera camera = command.context as Camera;
string error;
RemoveComponent<Camera>(command);
}

if (!DispatchRemoveComponent(camera))
[InitializeOnLoadMethod]
static void RegisterAdditionalDataMenus()
{
foreach (var additionalData in TypeCache.GetTypesDerivedFrom<IAdditionalData>())
{
//preserve built-in behavior
if (CanRemoveComponent(camera, out error))
Undo.DestroyObjectImmediate(command.context);
else
EditorUtility.DisplayDialog("Can't remove component", error, "Ok");
if (additionalData.GetCustomAttributes(typeof(RequireComponent), true).FirstOrDefault() is RequireComponent rc)
{
string types = rc.m_Type0.Name;
if (rc.m_Type1 != null)
types += $", {rc.m_Type1.Name}";
if (rc.m_Type2 != null)
types += $", {rc.m_Type2.Name}";

MenuManager.AddMenuItem($"CONTEXT/{additionalData.Name}/Remove Component",
string.Empty,
false,
0,
() => EditorUtility.DisplayDialog($"Remove {additionalData.Name} is blocked", $"You can not delete this component, you will have to remove the {types}.", "OK"),
() => true);
}
}
}

static bool DispatchRemoveComponent<T>(T component)
static void RemoveComponent<T>(MenuCommand command)
where T : Component
{
Type type = RenderPipelineEditorUtility.FetchFirstCompatibleTypeUsingScriptableRenderPipelineExtension<IRemoveAdditionalDataContextualMenu<T>>();
if (type != null)
T comp = command.context as T;

if (!DispatchRemoveComponent<T>(comp))
{
IRemoveAdditionalDataContextualMenu<T> instance = (IRemoveAdditionalDataContextualMenu<T>)Activator.CreateInstance(type);
instance.RemoveComponent(component, ComponentDependencies(component));
return true;
//preserve built-in behavior
if (RemoveComponentUtils.CanRemoveComponent(comp, RemoveComponentUtils.ComponentDependencies(comp)))
Undo.DestroyObjectImmediate(command.context);
}
return false;
}

static IEnumerable<Component> ComponentDependencies(Component component)
=> component.gameObject
.GetComponents<Component>()
.Where(c => c != component
&& c.GetType()
.GetCustomAttributes(typeof(RequireComponent), true)
.Count(att => att is RequireComponent rc
&& (rc.m_Type0 == component.GetType()
|| rc.m_Type1 == component.GetType()
|| rc.m_Type2 == component.GetType())) > 0);

static bool CanRemoveComponent(Component component, out string error)
static bool DispatchRemoveComponent<T>(T component)
where T : Component
{
var dependencies = ComponentDependencies(component);
if (dependencies.Count() == 0)
try
{
error = null;
var instance = new RemoveAdditionalDataContextualMenu<T>();
instance.RemoveComponent(component, RemoveComponentUtils.ComponentDependencies(component));
return true;
}

Component firstDependency = dependencies.First();
error = $"Can't remove {component.GetType().Name} because {firstDependency.GetType().Name} depends on it.";
return false;
catch
{
return false;
}
}
}

/// <summary>
/// Interface that should be used with [ScriptableRenderPipelineExtension(type))] attribute to dispatch ContextualMenu calls on the different SRPs
/// </summary>
/// <typeparam name="T">This must be a component that require AdditionalData in your SRP</typeparam>
[Obsolete("The menu items are handled automatically for components with the AdditionalComponentData attribute", false)]
public interface IRemoveAdditionalDataContextualMenu<T>
where T : Component
{
Expand All @@ -77,4 +121,50 @@ public interface IRemoveAdditionalDataContextualMenu<T>
/// <param name="dependencies">Dependencies.</param>
void RemoveComponent(T component, IEnumerable<Component> dependencies);
}

internal class RemoveAdditionalDataContextualMenu<T>
where T : Component
{
/// <summary>
/// Remove the given component
/// </summary>
/// <param name="component">The component to remove</param>
/// <param name="dependencies">Dependencies.</param>
public void RemoveComponent(T component, IEnumerable<Component> dependencies)
{
var additionalDatas = dependencies
.Where(c => c != component && typeof(IAdditionalData).IsAssignableFrom(c.GetType()))
.ToList();

if (!RemoveComponentUtils.CanRemoveComponent(component, dependencies.Where(c => !additionalDatas.Contains(c))))
return;

var isAssetEditing = EditorUtility.IsPersistent(component);
try
{
if (isAssetEditing)
{
AssetDatabase.StartAssetEditing();
}
Undo.SetCurrentGroupName($"Remove {typeof(T)} additional data components");

// The components with RequireComponent(typeof(T)) also contain the AdditionalData attribute, proceed with the remove
foreach (var additionalDataComponent in additionalDatas)
{
if (additionalDataComponent != null)
{
Undo.DestroyObjectImmediate(additionalDataComponent);
}
}
Undo.DestroyObjectImmediate(component);
}
finally
{
if (isAssetEditing)
{
AssetDatabase.StopAssetEditing();
}
}
}
}
}
5 changes: 5 additions & 0 deletions Editor/CoreEditorStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ internal static Texture2D GetMessageTypeIcon(MessageType messageType)
/// <summary>Reset All content</summary>
public static readonly GUIContent resetAllButtonLabel = EditorGUIUtility.TrTextContent("Reset All");

/// <summary>
/// Empty space content in case that you want to keep the indentation but have nothing to write
/// </summary>
public static readonly GUIContent empty = EditorGUIUtility.TrTextContent(" ");

#endregion

static CoreEditorStyles()
Expand Down
2 changes: 1 addition & 1 deletion Editor/CoreEditorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ public static T[] GetAdditionalData<T>(UnityEngine.Object[] targets, Action<T> i
/// <param name="name">The wanted name (can be updated with a number if a sibling with same name exist</param>
/// <param name="types">Required component on this object in addition to Transform</param>
/// <returns>The created object</returns>
static public GameObject CreateGameObject(GameObject parent, string name, params Type[] types)
public static GameObject CreateGameObject(GameObject parent, string name, params Type[] types)
=> ObjectFactory.CreateGameObject(GameObjectUtility.GetUniqueNameForSibling(parent != null ? parent.transform : null, name), types);

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Editor/Debugging/DebugState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public override int GetHashCode()
{
int hash = 13;
hash = hash * 23 + m_QueryPath.GetHashCode();
hash = hash * 23 + m_Value.GetHashCode();
if (m_Value != null)
hash = hash * 23 + m_Value.GetHashCode();
return hash;
}
}
Expand Down
4 changes: 3 additions & 1 deletion Editor/Debugging/DebugWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ public void ApplyStates(bool forceApplyAll = false)

void ApplyState(string queryPath, DebugState state)
{
if (!(DebugManager.instance.GetItem(queryPath) is DebugUI.IValueField widget))
if (state == null ||
state.GetValue() == null ||
!(DebugManager.instance.GetItem(queryPath) is DebugUI.IValueField widget))
return;

widget.SetValue(state.GetValue());
Expand Down
61 changes: 61 additions & 0 deletions Editor/Lighting/LightUI.Drawers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System;
using UnityEngine;
using UnityEngine.Rendering;

namespace UnityEditor.Rendering
{
/// <summary>
/// Contains a set of methods to help render the inspectors of Lights across SRP's
/// </summary>
public partial class LightUI
{
public static void DrawColor(ISerializedLight serialized, Editor owner)
{
if (GraphicsSettings.lightsUseLinearIntensity && GraphicsSettings.lightsUseColorTemperature)
{
// Use the color temperature bool to create a popup dropdown to choose between the two modes.
var colorTemperaturePopupValue = Convert.ToInt32(serialized.settings.useColorTemperature.boolValue);
colorTemperaturePopupValue = EditorGUILayout.Popup(Styles.lightAppearance, colorTemperaturePopupValue, Styles.lightAppearanceOptions);
serialized.settings.useColorTemperature.boolValue = Convert.ToBoolean(colorTemperaturePopupValue);

if (serialized.settings.useColorTemperature.boolValue)
{
EditorGUI.indentLevel += 1;
EditorGUILayout.PropertyField(serialized.settings.color, Styles.colorFilter);

// Light unit slider
const int k_ValueUnitSeparator = 2;
var lineRect = EditorGUILayout.GetControlRect();
var labelRect = lineRect;
labelRect.width = EditorGUIUtility.labelWidth;
EditorGUI.LabelField(labelRect, Styles.colorTemperature);

var temperatureSliderRect = lineRect;
temperatureSliderRect.x += EditorGUIUtility.labelWidth + k_ValueUnitSeparator;
temperatureSliderRect.width -= EditorGUIUtility.labelWidth + k_ValueUnitSeparator;
TemperatureSliderUIDrawer.Draw(serialized.settings, serialized.serializedObject, serialized.settings.colorTemperature, temperatureSliderRect);

// Value and unit label
// Match const defined in EditorGUI.cs
const int k_IndentPerLevel = 15;
const int k_UnitWidth = 60 + k_IndentPerLevel;
int indent = k_IndentPerLevel * EditorGUI.indentLevel;
Rect valueRect = EditorGUILayout.GetControlRect();
valueRect.width += indent - k_ValueUnitSeparator - k_UnitWidth;
Rect unitRect = valueRect;
unitRect.x += valueRect.width - indent + k_ValueUnitSeparator;
unitRect.width = k_UnitWidth + .5f;

EditorGUI.PropertyField(valueRect, serialized.settings.colorTemperature, CoreEditorStyles.empty);
EditorGUI.LabelField(unitRect, Styles.lightAppearanceUnits[0]);

EditorGUI.indentLevel -= 1;
}
else
EditorGUILayout.PropertyField(serialized.settings.color, Styles.color);
}
else
EditorGUILayout.PropertyField(serialized.settings.color, Styles.color);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions Editor/Lighting/LightUI.Skin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using UnityEngine;

namespace UnityEditor.Rendering
{
/// <summary>
/// Contains a set of methods to help render the inspectors of Lights across SRP's
/// </summary>
public partial class LightUI
{
/// <summary>
/// Styles
/// </summary>
public static class Styles
{
public static readonly GUIContent generalHeader = EditorGUIUtility.TrTextContent("General");
public static readonly GUIContent shapeHeader = EditorGUIUtility.TrTextContent("Shape");
public static readonly GUIContent renderingHeader = EditorGUIUtility.TrTextContent("Rendering");
public static readonly GUIContent emissionHeader = EditorGUIUtility.TrTextContent("Emission");
public static readonly GUIContent shadowHeader = EditorGUIUtility.TrTextContent("Shadows");

public static readonly GUIContent lightLayer = EditorGUIUtility.TrTextContent("Light Layer", "Specifies the current Light Layers that the Light affects. This Light illuminates corresponding Renderers with the same Light Layer flags.");

// Emission
public static readonly GUIContent color = EditorGUIUtility.TrTextContent("Color", "Specifies the color this Light emits.");
public static readonly GUIContent lightAppearance = EditorGUIUtility.TrTextContent("Light Appearance", "Specifies the mode for this Light's color is calculated.");
public static readonly GUIContent[] lightAppearanceOptions = new[]
{
EditorGUIUtility.TrTextContent("Color"),
EditorGUIUtility.TrTextContent("Filter and Temperature")
};
public static readonly GUIContent[] lightAppearanceUnits = new[]
{
EditorGUIUtility.TrTextContent("Kelvin")
};
public static readonly GUIContent colorFilter = EditorGUIUtility.TrTextContent("Filter", "Specifies a color which tints the Light source.");
public static readonly GUIContent colorTemperature = EditorGUIUtility.TrTextContent("Temperature", "Specifies a temperature (in Kelvin) used to correlate a color for the Light. For reference, White is 6500K.");

public static readonly string unsupportedPresetPropertiesMessage = L10n.Tr("When using Preset of Light Component, only a subset of properties are supported. Unsupported properties are hidden.");
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Editor/Lighting/ProbeVolume/ProbeGIBaking.Dilate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ static void PerformDilation(ProbeReferenceVolume.Cell cell, ProbeDilationSetting
cmd.SetComputeBufferParam(dilationShader, dilationKernel, _OutputProbes, data.outputProbes);

int probeCount = cell.probePositions.Length;
cmd.SetComputeVectorParam(dilationShader, _DilationParameters, new Vector4(probeCount, settings.dilationValidityThreshold, settings.dilationDistance, settings.brickSize));

cmd.SetComputeVectorParam(dilationShader, _DilationParameters, new Vector4(probeCount, settings.dilationValidityThreshold, settings.dilationDistance, ProbeReferenceVolume.instance.MinBrickSize()));
cmd.SetComputeVectorParam(dilationShader, _DilationParameters2, new Vector4(settings.squaredDistWeighting ? 1 : 0, 0, 0, 0));

var refVolume = ProbeReferenceVolume.instance;
Expand Down
Loading

0 comments on commit f2acfae

Please sign in to comment.