Skip to content

Commit

Permalink
Merge pull request #8061 from Unity-Technologies/internal/2021.3/staging
Browse files Browse the repository at this point in the history
Internal/2021.3/staging
  • Loading branch information
UnityAljosha authored Apr 11, 2024
2 parents 9c530ca + fd82bba commit 8a0673f
Show file tree
Hide file tree
Showing 22 changed files with 91 additions and 37 deletions.
9 changes: 9 additions & 0 deletions Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

### Fixed
- Fixed issue where errors could be thrown by debug action registration if deleting all axes in Input Manager.
- Fixed DebugUI.Button not working in Rendering Debugger runtime UI.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ real3 UnpackNormalOctRectEncode(real2 f)
// Ref: http://jcgt.org/published/0003/02/01/paper.pdf "A Survey of Efficient Representations for Independent Unit Vectors"
// Encode with Oct, this function work with any size of output
// return float between [-1, 1]
float2 PackNormalOctQuadEncode(float3 n)
real2 PackNormalOctQuadEncode(float3 n)
{
//float l1norm = dot(abs(n), 1.0);
//float2 res0 = n.xy * (1.0 / l1norm);
Expand All @@ -64,20 +64,20 @@ float2 PackNormalOctQuadEncode(float3 n)

// Optimized version of above code:
n *= rcp(max(dot(abs(n), 1.0), 1e-6));
float t = saturate(-n.z);
return n.xy + float2(n.x >= 0.0 ? t : -t, n.y >= 0.0 ? t : -t);
real t = saturate(-n.z);
return n.xy + real2(n.x >= 0.0 ? t : -t, n.y >= 0.0 ? t : -t);
}

float3 UnpackNormalOctQuadEncode(float2 f)
real3 UnpackNormalOctQuadEncode(real2 f)
{
float3 n = float3(f.x, f.y, 1.0 - abs(f.x) - abs(f.y));
real3 n = real3(f.x, f.y, 1.0 - abs(f.x) - abs(f.y));

//float2 val = 1.0 - abs(n.yx);
//n.xy = (n.zz < float2(0.0, 0.0) ? (n.xy >= 0.0 ? val : -val) : n.xy);

// Optimized version of above code:
float t = max(-n.z, 0.0);
n.xy += float2(n.x >= 0.0 ? -t : t, n.y >= 0.0 ? -t : t);
real t = max(-n.z, 0.0);
n.xy += real2(n.x >= 0.0 ? -t : t, n.y >= 0.0 ? -t : t);

return normalize(n);
}
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.unity.render-pipelines.core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.render-pipelines.core",
"description": "SRP Core makes it easier to create or customize a Scriptable Render Pipeline (SRP). SRP Core contains reusable code, including boilerplate code for working with platform-specific graphics APIs, utility functions for common rendering operations, and shader libraries. The code in SRP Core is use by the High Definition Render Pipeline (HDRP) and Universal Render Pipeline (URP). If you are creating a custom SRP from scratch or customizing a prebuilt SRP, using SRP Core will save you time.",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"displayName": "Core RP Library",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "com.unity.render-pipelines.high-definition-config",
"description": "Configuration files for the High Definition Render Pipeline.",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"displayName": "High Definition RP Config",
"dependencies": {
"com.unity.render-pipelines.core": "12.1.14"
"com.unity.render-pipelines.core": "12.1.15"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

### Fixed
- Fixed shader compilation issues related to ternary operater misuse.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
10 changes: 5 additions & 5 deletions Packages/com.unity.render-pipelines.high-definition/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.render-pipelines.high-definition",
"description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting, and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations, and more to a high graphical standard.",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"displayName": "High Definition RP",
"dependencies": {
Expand All @@ -11,10 +11,10 @@
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.render-pipelines.core": "12.1.14",
"com.unity.shadergraph": "12.1.14",
"com.unity.visualeffectgraph": "12.1.14",
"com.unity.render-pipelines.high-definition-config": "12.1.14"
"com.unity.render-pipelines.core": "12.1.15",
"com.unity.shadergraph": "12.1.15",
"com.unity.visualeffectgraph": "12.1.15",
"com.unity.render-pipelines.high-definition-config": "12.1.15"
},
"keywords": [
"graphics",
Expand Down
9 changes: 9 additions & 0 deletions Packages/com.unity.render-pipelines.universal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

### Fixed
- Fixed bright pixels when using a camera with skybox and MSAA rendering opaque objects with alpha clipping together with a transparent object if additive blending.
- Fixed an issue where renderer features didn't pass validation if they inherit from another renderer feature.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ public static PassDescriptor _2D(UniversalTarget target)
var result = new PassDescriptor()
{
// Definition
displayName = "Universal 2D",
referenceName = "SHADERPASS_2D",
lightMode = "Universal2D",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
if (intermediateRenderTexture)
CreateCameraRenderTarget(context, ref cameraTargetDescriptor, useDepthPriming);
m_RenderOpaqueForwardPass.m_IsActiveTargetBackBuffer = !intermediateRenderTexture;
m_RenderTransparentForwardPass.m_IsActiveTargetBackBuffer = !intermediateRenderTexture;
#if ENABLE_VR && ENABLE_XR_MODULE
m_XROcclusionMeshPass.m_IsActiveTargetBackBuffer = !intermediateRenderTexture;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ internal void UpdateCameraData(ref CameraData baseCameraData, in XRPass xr)
baseCameraData.pixelHeight = (int)System.Math.Round(camPixelRect.height + camPixelRect.y) - (int)System.Math.Round(camPixelRect.y);
baseCameraData.aspectRatio = (float)baseCameraData.pixelWidth / (float)baseCameraData.pixelHeight;

bool isDefaultXRViewport = (!(Math.Abs(xrViewport.x) > 0.0f || Math.Abs(xrViewport.y) > 0.0f ||
Math.Abs(xrViewport.width) < xr.renderTargetDesc.width ||
Math.Abs(xrViewport.height) < xr.renderTargetDesc.height));
baseCameraData.isDefaultViewport = baseCameraData.isDefaultViewport && isDefaultXRViewport;

// Update cameraData cameraTargetDescriptor for XR. This descriptor is mainly used for configuring intermediate screen space textures
var originalTargetDesc = baseCameraData.cameraTargetDescriptor;
baseCameraData.cameraTargetDescriptor = xr.renderTargetDesc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"Exceptions": [
{
"ValidationTest": "Package Lifecycle Validation",
"ExceptionError": "Package [email protected].14 depends on package [email protected] which is in an invalid track for release purposes. Release versions can only depend on Release versions.",
"PackageVersion": "12.1.14"
"ExceptionError": "Package [email protected].15 depends on package [email protected] which is in an invalid track for release purposes. Release versions can only depend on Release versions.",
"PackageVersion": "12.1.15"
}
]
}
6 changes: 3 additions & 3 deletions Packages/com.unity.render-pipelines.universal/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "com.unity.render-pipelines.universal",
"description": "The Universal Render Pipeline (URP) is a prebuilt Scriptable Render Pipeline, made by Unity. URP provides artist-friendly workflows that let you quickly and easily create optimized graphics across a range of platforms, from mobile to high-end consoles and PCs.",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"displayName": "Universal RP",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.burst": "1.8.9",
"com.unity.render-pipelines.core": "12.1.14",
"com.unity.shadergraph": "12.1.14"
"com.unity.render-pipelines.core": "12.1.15",
"com.unity.shadergraph": "12.1.15"
},
"keywords": [
"graphics",
Expand Down
8 changes: 8 additions & 0 deletions Packages/com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package are documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected override string ConcreteSlotValueAsVariable()
var channelCount = SlotValueHelper.GetChannelCount(concreteValueType);
string values = NodeUtils.FloatToShaderValue(value.x);
if (channelCount == 1)
return values;
return string.Format("$precision({0})", values);
for (var i = 1; i < channelCount; i++)
values += ", " + NodeUtils.FloatToShaderValue(value[i]);
return string.Format("$precision{0}({1})", channelCount, values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public override VisualElement InstantiateControl()

protected override string ConcreteSlotValueAsVariable()
{
return NodeUtils.FloatToShaderValue(value);
return string.Format("$precision({0})", NodeUtils.FloatToShaderValue(value));
}

public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public void MaterialSlotReturnsValidDefaultValue()
Assert.AreEqual(expected, result);

m_NodeA.slot1.value = 6;
result = m_NodeA.slot1.GetDefaultValue(GenerationMode.ForReals);
Assert.AreEqual("6", result);
result = m_NodeA.slot1.GetDefaultValue(GenerationMode.ForReals, ConcretePrecision.Half);
Assert.AreEqual("half(6)", result);

m_NodeA.slot2.value = new Vector4(6, 6, 6, 1);
result = m_NodeA.slot2.GetDefaultValue(GenerationMode.ForReals, ConcretePrecision.Half);
Expand Down
4 changes: 2 additions & 2 deletions Packages/com.unity.shadergraph/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "com.unity.shadergraph",
"description": "The Shader Graph package adds a visual Shader editing tool to Unity. You can use this tool to create Shaders in a visual way instead of writing code. Specific render pipelines can implement specific graph features. Currently, both the High Definition Rendering Pipeline and the Universal Rendering Pipeline support Shader Graph.",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"displayName": "Shader Graph",
"dependencies": {
"com.unity.render-pipelines.core": "12.1.14",
"com.unity.render-pipelines.core": "12.1.15",
"com.unity.searcher": "4.9.1"
},
"samples": [
Expand Down
9 changes: 9 additions & 0 deletions Packages/com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.

### Fixed
- Fixed missing node links when copy/pasting a system with missing PointCacheAsset.
- Incompatibility with HLSL 2021.

## [12.1.13] - 2023-12-21

This version is compatible with Unity 2021.3.35f1.
Expand Down
6 changes: 3 additions & 3 deletions Packages/com.unity.visualeffectgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.visualeffectgraph",
"displayName": "Visual Effect Graph",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"description": "The Visual Effect Graph is a node based visual effect editor. It allows you to author next generation visual effects that Unity simulates directly on the GPU. The Visual Effect Graph is production-ready for the High Definition Render Pipeline and runs on all platforms supported by it. Full support for the Universal Render Pipeline and compatible mobile devices is still in development.",
"keywords": [
Expand All @@ -12,8 +12,8 @@
"particles"
],
"dependencies": {
"com.unity.shadergraph": "12.1.14",
"com.unity.render-pipelines.core": "12.1.14"
"com.unity.shadergraph": "12.1.15",
"com.unity.render-pipelines.core": "12.1.15"
},
"samples": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.testing.graphics-performance",
"displayName": "Performance Graphics Tests Framework",
"version": "12.1.14",
"version": "12.1.15",
"unity": "2021.3",
"unityRelease": "0a1",
"description": "Provides performance framework helpers for writing tests for graphics code, such as test scene asset description, performance performance report and shader static analysis.",
Expand All @@ -16,6 +16,6 @@
"dependencies": {
"com.unity.test-framework.performance": "3.0.3",
"com.unity.shaderanalysis": "1.0.0",
"com.unity.render-pipelines.core": "12.1.14"
"com.unity.render-pipelines.core": "12.1.15"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ public IEnumerator MoveDirectoryTests()
yield return null;

CloseGraphWindow();

// Wait for any potential compilation to finish before entering cleanup, which deletes the files
while (ShaderUtil.anythingCompiling)
{
yield return null;
}
}
}
}

0 comments on commit 8a0673f

Please sign in to comment.