Skip to content

Commit

Permalink
com.unity.render-pipelines.core@11.0.0 in Unity 2021.1.24f1
Browse files Browse the repository at this point in the history
## [11.0.0] - 2020-10-21

### Added
- Support for the PlayStation 5 platform has been added.
- Support for the XboxSeries platform has been added.
- New API in DynamicResolutionHandler to handle multicamera rendering for hardware mode. Changing cameras and resetting scaling per camera should be safe.
- New API functions with no side effects in DynamicResolutionHandler, to retrieve resolved drs scale and to apply DRS on a size.
- Added SpeedTree8MaterialUpgrader, which provides utilities for upgrading and importing SpeedTree 8 assets to scriptable render pipelines.

### Fixed
- Fixed the default background color for previews to use the original color.
- Fixed a bug in FreeCamera which would only provide a speed boost for the first frame when pressing the Shfit key.
- Fixed spacing between property fields on the Volume Component Editors.
- Fixed ALL/NONE to maintain the state on the Volume Component Editors.
- Fixed the selection of the Additional properties from ALL/NONE when the option "Show additional properties" is disabled
- Fixed ACES tonemaping for Nintendo Switch by forcing some shader color conversion functions to full float precision.
- 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
- Fixed ACES tonemaping on mobile platforms by forcing some shader color conversion functions to full float precision.
- Fix crash on VolumeComponentWithQualityEditor when the current Pipeline is not HDRP
- Calculating correct rtHandleScale by considering the possible pixel rounding when DRS is on
- Fixed ACES filter artefact due to half floating point error on some mobile platforms.
  • Loading branch information
Unity Technologies committed Sep 28, 2021
1 parent 3754d13 commit 5076f14
Show file tree
Hide file tree
Showing 31 changed files with 183 additions and 182 deletions.
2 changes: 1 addition & 1 deletion Editor/CoreEditorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group,

// Context menu
var menuIcon = CoreEditorStyles.paneOptionsIcon;
var menuRect = new Rect(labelRect.xMax + 3f + 16 + 5 , labelRect.y + 1f, menuIcon.width, menuIcon.height);
var menuRect = new Rect(labelRect.xMax + 3f + 16 + 5, labelRect.y + 1f, menuIcon.width, menuIcon.height);

if (contextAction != null)
GUI.DrawTexture(menuRect, menuIcon);
Expand Down
4 changes: 2 additions & 2 deletions Editor/Debugging/DebugWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace UnityEditor.Rendering
{
#pragma warning disable 414
#pragma warning disable 414

[Serializable]
sealed class WidgetStateDictionary : SerializedDictionary<string, DebugState> {}
Expand Down Expand Up @@ -580,5 +580,5 @@ public Styles()
}
}

#pragma warning restore 414
#pragma warning restore 414
}
8 changes: 4 additions & 4 deletions Editor/Lighting/CoreLightEditorUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ static void DrawPointHandlesAndLabels(Light light)
var firstControl = GUIUtility.GetControlID(s_PointLightHandle.GetHashCode(), FocusType.Passive) - 6; // BoxBoundsHandle allocates 6 control IDs
if (Event.current.type != EventType.Repaint)
return;
// var firstControl = GUIUtility.GetControlID(k_RadiusHandleHash, FocusType.Passive) - 6;
// if (Event.current.type != EventType.Repaint)
// return;
// var firstControl = GUIUtility.GetControlID(k_RadiusHandleHash, FocusType.Passive) - 6;
// if (Event.current.type != EventType.Repaint)
// return;

// Adding label /////////////////////////////////////
Vector3 labelPosition = Vector3.zero;
Expand Down Expand Up @@ -312,7 +312,7 @@ static void DrawHandleLabel(Vector3 handlePosition, string labelText, float offs
{
Vector3 labelPosition = Vector3.zero;

var style = new GUIStyle {normal = {background = Texture2D.whiteTexture}};
var style = new GUIStyle { normal = { background = Texture2D.whiteTexture } };
GUI.color = new Color(0.82f, 0.82f, 0.82f, 1);

labelPosition = handlePosition + Handles.inverseMatrix.MultiplyVector(Vector3.up) * HandleUtility.GetHandleSize(handlePosition) * offsetFromHandle;
Expand Down
8 changes: 4 additions & 4 deletions Editor/LookDev/ComparisonGizmoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ void OnMouseDrag(MouseMoveEvent evt)

switch (m_Selected)
{
case Selected.PlaneSeparator: OnDragPlaneSeparator(evt); break;
case Selected.PlaneSeparator: OnDragPlaneSeparator(evt); break;
case Selected.NodeFirstView:
case Selected.NodeSecondView: OnDragPlaneNodeExtremity(evt); break;
case Selected.Fader: OnDragFader(evt); break;
default: throw new ArgumentException("Unknown kind of Selected");
case Selected.NodeSecondView: OnDragPlaneNodeExtremity(evt); break;
case Selected.Fader: OnDragFader(evt); break;
default: throw new ArgumentException("Unknown kind of Selected");
}
}

Expand Down
3 changes: 2 additions & 1 deletion Editor/Volume/VolumeComponentEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ public virtual void OnEnable()
GetFields(target, fields);

m_Parameters = fields
.Select(t => {
.Select(t =>
{
var name = "";
var order = 0;
var attr = (DisplayInfoAttribute[])t.Item1.GetCustomAttributes(typeof(DisplayInfoAttribute), true);
Expand Down
2 changes: 1 addition & 1 deletion Editor/Volume/VolumeComponentProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public VolumeComponentElement(int level, string label, Type type)

class PathNode : IComparable<PathNode>
{
public List<PathNode> nodes = new List<PathNode>();
public List<PathNode> nodes = new List<PathNode>();
public string name;
public Type type;

Expand Down
4 changes: 2 additions & 2 deletions Runtime/Camera/CameraSwitcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class CameraSwitcher : MonoBehaviour
private Quaternion m_OriginalCameraRotation;
private Camera m_CurrentCamera = null;

GUIContent[] m_CameraNames = null;
int[] m_CameraIndices = null;
GUIContent[] m_CameraNames = null;
int[] m_CameraIndices = null;

DebugUI.EnumField m_DebugEntry;

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Camera/FreeCamera.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if ENABLE_INPUT_SYSTEM && ENABLE_INPUT_SYSTEM_PACKAGE
#define USE_INPUT_SYSTEM
#define USE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Common/CommonStructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace UnityEngine.Rendering
public enum ClearFlag
{
/// <summary>Don't clear.</summary>
None = 0,
None = 0,
/// <summary>Clear the color buffer.</summary>
Color = 1,
/// <summary>Clear the depth buffer.</summary>
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Common/DynamicResolutionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public enum DynamicResScalePolicyType
/// </summary>
public class DynamicResolutionHandler
{
private bool m_Enabled;
private bool m_Enabled;
private float m_MinScreenFraction;
private float m_MaxScreenFraction;
private float m_CurrentFraction;
Expand Down Expand Up @@ -348,7 +348,7 @@ public bool SoftwareDynamicResIsEnabled()
/// <returns>True: Hardware dynamic resolution is enabled</returns>
public bool HardwareDynamicResIsEnabled()
{
return !m_ForceSoftwareFallback && m_CurrentCameraRequest && m_Enabled && type == DynamicResolutionType.Hardware;
return !m_ForceSoftwareFallback && m_CurrentCameraRequest && m_Enabled && type == DynamicResolutionType.Hardware;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Common/ListBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public bool TryAdd(in T value)
/// <param name="copyCount">The number of item to copy.</param>
public unsafe void CopyTo(T* dstBuffer, int startDstIndex, int copyCount)
{
UnsafeUtility.MemCpy(dstBuffer + startDstIndex, m_BufferPtr,
UnsafeUtility.MemCpy(dstBuffer + startDstIndex, m_BufferPtr,
UnsafeUtility.SizeOf<T>() * copyCount);
}

Expand Down
6 changes: 3 additions & 3 deletions Runtime/Common/XRGraphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public static bool tryEnable
{
get
{
#if UNITY_2020_1_OR_NEWER
#if UNITY_2020_1_OR_NEWER
return false;
#else
#else
return UnityEditorInternal.VR.VREditor.GetVREnabledOnTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget));
#endif
#endif
}
}
#endif
Expand Down
24 changes: 12 additions & 12 deletions Runtime/Debugging/DebugManager.Actions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if ENABLE_INPUT_SYSTEM && ENABLE_INPUT_SYSTEM_PACKAGE
#define USE_INPUT_SYSTEM
#define USE_INPUT_SYSTEM
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
#endif
Expand Down Expand Up @@ -30,17 +30,17 @@ enum DebugActionRepeatMode

public sealed partial class DebugManager
{
const string kEnableDebugBtn1 = "Enable Debug Button 1";
const string kEnableDebugBtn2 = "Enable Debug Button 2";
const string kEnableDebugBtn1 = "Enable Debug Button 1";
const string kEnableDebugBtn2 = "Enable Debug Button 2";
const string kDebugPreviousBtn = "Debug Previous";
const string kDebugNextBtn = "Debug Next";
const string kValidateBtn = "Debug Validate";
const string kPersistentBtn = "Debug Persistent";
const string kDPadVertical = "Debug Vertical";
const string kDPadHorizontal = "Debug Horizontal";
const string kMultiplierBtn = "Debug Multiplier";
const string kResetBtn = "Debug Reset";
const string kEnableDebug = "Enable Debug";
const string kDebugNextBtn = "Debug Next";
const string kValidateBtn = "Debug Validate";
const string kPersistentBtn = "Debug Persistent";
const string kDPadVertical = "Debug Vertical";
const string kDPadHorizontal = "Debug Horizontal";
const string kMultiplierBtn = "Debug Multiplier";
const string kResetBtn = "Debug Reset";
const string kEnableDebug = "Enable Debug";

DebugActionDesc[] m_DebugActions;
DebugActionState[] m_DebugActionStates;
Expand Down Expand Up @@ -159,7 +159,7 @@ void SampleAction(int actionIndex)
var desc = m_DebugActions[actionIndex];
var state = m_DebugActionStates[actionIndex];

// Disable all input events if we're using the new input system
// Disable all input events if we're using the new input system
#if USE_INPUT_SYSTEM
if (state.runningAction == false)
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Debugging/DebugShapes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void BuildCone(ref Mesh outputMesh, float height, float topRadius, float bottomR
}

// Top cap
vertices[vert++] = new Vector3(0f, 0f , height);
vertices[vert++] = new Vector3(0f, 0f, height);
while (vert <= nbSides * 2 + 1)
{
float rad = (float)(vert - nbSides - 1) / nbSides * _2pi;
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Debugging/DebugUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public enum Flags
/// <summary>
/// None.
/// </summary>
None = 0,
None = 0,
/// <summary>
/// This widget is Editor only.
/// </summary>
EditorOnly = 1 << 1,
EditorOnly = 1 << 1,
/// <summary>
/// This widget is Runtime only.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Debugging/MousePositionDebug.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if ENABLE_INPUT_SYSTEM && ENABLE_INPUT_SYSTEM_PACKAGE
#define USE_INPUT_SYSTEM
#define USE_INPUT_SYSTEM
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
#endif
Expand Down
90 changes: 45 additions & 45 deletions Runtime/RenderGraph/RenderGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public enum DepthAccess
public class RenderGraphContext
{
///<summary>Scriptable Render Context used for rendering.</summary>
public ScriptableRenderContext renderContext;
public ScriptableRenderContext renderContext;
///<summary>Command Buffer used for rendering.</summary>
public CommandBuffer cmd;
public CommandBuffer cmd;
///<summary>Render Graph pooll used for temporary data.</summary>
public RenderGraphObjectPool renderGraphPool;
public RenderGraphObjectPool renderGraphPool;
///<summary>Render Graph default resources.</summary>
public RenderGraphDefaultResources defaultResources;
public RenderGraphDefaultResources defaultResources;
}

/// <summary>
Expand Down Expand Up @@ -70,9 +70,9 @@ public void RegisterDebug(string name)
action = () =>
{
logFrameInformation = true;
#if UNITY_EDITOR
#if UNITY_EDITOR
UnityEditor.SceneView.RepaintAll();
#endif
#endif
}
});
list.Add(new DebugUI.Button
Expand All @@ -81,9 +81,9 @@ public void RegisterDebug(string name)
action = () =>
{
logResources = true;
#if UNITY_EDITOR
#if UNITY_EDITOR
UnityEditor.SceneView.RepaintAll();
#endif
#endif
}
});

Expand Down Expand Up @@ -159,9 +159,9 @@ public class RenderGraph

internal struct CompiledResourceInfo
{
public List<int> producers;
public List<int> consumers;
public int refCount;
public List<int> producers;
public List<int> consumers;
public int refCount;

public void Reset()
{
Expand All @@ -179,19 +179,19 @@ public void Reset()
[DebuggerDisplay("RenderPass: {pass.name} (Index:{pass.index} Async:{enableAsyncCompute})")]
internal struct CompiledPassInfo
{
public RenderGraphPass pass;
public List<int>[] resourceCreateList;
public List<int>[] resourceReleaseList;
public int refCount;
public bool culled;
public bool hasSideEffect;
public int syncToPassIndex; // Index of the pass that needs to be waited for.
public int syncFromPassIndex; // Smaller pass index that waits for this pass.
public bool needGraphicsFence;
public GraphicsFence fence;
public RenderGraphPass pass;
public List<int>[] resourceCreateList;
public List<int>[] resourceReleaseList;
public int refCount;
public bool culled;
public bool hasSideEffect;
public int syncToPassIndex; // Index of the pass that needs to be waited for.
public int syncFromPassIndex; // Smaller pass index that waits for this pass.
public bool needGraphicsFence;
public GraphicsFence fence;

public bool enableAsyncCompute;
public bool allowPassCulling { get { return pass.allowPassCulling; } }
public bool enableAsyncCompute;
public bool allowPassCulling { get { return pass.allowPassCulling; } }

#if DEVELOPMENT_BUILD || UNITY_EDITOR
// This members are only here to ease debugging.
Expand Down Expand Up @@ -248,32 +248,32 @@ public void Reset(RenderGraphPass pass)
}
}

RenderGraphResourceRegistry m_Resources;
RenderGraphObjectPool m_RenderGraphPool = new RenderGraphObjectPool();
List<RenderGraphPass> m_RenderPasses = new List<RenderGraphPass>(64);
List<RendererListHandle> m_RendererLists = new List<RendererListHandle>(32);
RenderGraphDebugParams m_DebugParameters = new RenderGraphDebugParams();
RenderGraphLogger m_Logger = new RenderGraphLogger();
RenderGraphDefaultResources m_DefaultResources = new RenderGraphDefaultResources();
Dictionary<int, ProfilingSampler> m_DefaultProfilingSamplers = new Dictionary<int, ProfilingSampler>();
bool m_ExecutionExceptionWasRaised;
RenderGraphContext m_RenderGraphContext = new RenderGraphContext();
CommandBuffer m_PreviousCommandBuffer;
int m_CurrentImmediatePassIndex;
List<int>[] m_ImmediateModeResourceList = new List<int>[(int)RenderGraphResourceType.Count];
RenderGraphResourceRegistry m_Resources;
RenderGraphObjectPool m_RenderGraphPool = new RenderGraphObjectPool();
List<RenderGraphPass> m_RenderPasses = new List<RenderGraphPass>(64);
List<RendererListHandle> m_RendererLists = new List<RendererListHandle>(32);
RenderGraphDebugParams m_DebugParameters = new RenderGraphDebugParams();
RenderGraphLogger m_Logger = new RenderGraphLogger();
RenderGraphDefaultResources m_DefaultResources = new RenderGraphDefaultResources();
Dictionary<int, ProfilingSampler> m_DefaultProfilingSamplers = new Dictionary<int, ProfilingSampler>();
bool m_ExecutionExceptionWasRaised;
RenderGraphContext m_RenderGraphContext = new RenderGraphContext();
CommandBuffer m_PreviousCommandBuffer;
int m_CurrentImmediatePassIndex;
List<int>[] m_ImmediateModeResourceList = new List<int>[(int)RenderGraphResourceType.Count];

// Compiled Render Graph info.
DynamicArray<CompiledResourceInfo>[] m_CompiledResourcesInfos = new DynamicArray<CompiledResourceInfo>[(int)RenderGraphResourceType.Count];
DynamicArray<CompiledPassInfo> m_CompiledPassInfos = new DynamicArray<CompiledPassInfo>();
Stack<int> m_CullingStack = new Stack<int>();
DynamicArray<CompiledResourceInfo>[] m_CompiledResourcesInfos = new DynamicArray<CompiledResourceInfo>[(int)RenderGraphResourceType.Count];
DynamicArray<CompiledPassInfo> m_CompiledPassInfos = new DynamicArray<CompiledPassInfo>();
Stack<int> m_CullingStack = new Stack<int>();

int m_ExecutionCount;
int m_CurrentFrameIndex;
bool m_HasRenderGraphBegun;
RenderGraphDebugData m_RenderGraphDebugData = new RenderGraphDebugData();
int m_ExecutionCount;
int m_CurrentFrameIndex;
bool m_HasRenderGraphBegun;
RenderGraphDebugData m_RenderGraphDebugData = new RenderGraphDebugData();

// Global list of living render graphs
static List<RenderGraph> s_RegisteredGraphs = new List<RenderGraph>();
static List<RenderGraph> s_RegisteredGraphs = new List<RenderGraph>();

#region Public Interface
/// <summary>Name of the Render Graph.</summary>
Expand Down Expand Up @@ -657,7 +657,7 @@ public void EndProfilingSampler(ProfilingSampler sampler)
#endregion

#region Internal Interface
internal static List<RenderGraph> GetRegisteredRenderGraphs()
internal static List<RenderGraph> GetRegisteredRenderGraphs()
{
return s_RegisteredGraphs;
}
Expand Down
6 changes: 3 additions & 3 deletions Runtime/RenderGraph/RenderGraphBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace UnityEngine.Experimental.Rendering.RenderGraphModule
/// </summary>
public struct RenderGraphBuilder : IDisposable
{
RenderGraphPass m_RenderPass;
RenderGraphPass m_RenderPass;
RenderGraphResourceRegistry m_Resources;
RenderGraph m_RenderGraph;
bool m_Disposed;
RenderGraph m_RenderGraph;
bool m_Disposed;

#region Public Interface
/// <summary>
Expand Down
Loading

0 comments on commit 5076f14

Please sign in to comment.