Skip to content

Commit

Permalink
Merge pull request #7969 from Unity-Technologies/internal/2022.3/staging
Browse files Browse the repository at this point in the history
Internal/2022.3/staging
  • Loading branch information
UnityAljosha authored Oct 9, 2023
2 parents a6d5633 + 6fd3265 commit ae9e4b7
Show file tree
Hide file tree
Showing 160 changed files with 28,939 additions and 2,157 deletions.
17 changes: 17 additions & 0 deletions Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ 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.

## [14.0.8] - 2023-09-27

This version is compatible with Unity 2022.3.11f1.

### Added
- Added callbacks when RenderPipeline is created or disposed.
- ObjectID Render Request that provides a render texture with the ObjectId of each pixel.

### Fixed
- Fixed potentially broken rendering and errors after renaming a VolumeProfile asset.
- Fixed popup showing multiple time when trying to remove additional data while in multi selection..
- Removed some unexpected SRP changed callback invocations.
- Fixed Rendering Debugger runtime UI getting occluded by user UI with sorting order larger than 0.
- Fixed console errors when debug actions are removed from Input Manager during play mode.
- When building for Built-in, shaders from any SRP are completely stripped.
- Fixed occasional ArgumentOutOfRangeException in StaticLightingSky.

## [14.0.7] - 2023-05-23

This version is compatible with Unity 2022.2.22f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,11 @@ static public void ComputeOcclusion(Material lensFlareShader, Camera cam,
float distanceAttenuation = !isDirLight && comp.distanceAttenuationCurve.length > 0 ? comp.distanceAttenuationCurve.Evaluate(coefDistSample) : 1.0f;
float scaleByDistance = !isDirLight && comp.scaleByDistanceCurve.length >= 1 ? comp.scaleByDistanceCurve.Evaluate(coefScaleSample) : 1.0f;

Vector3 dir = (cam.transform.position - comp.transform.position).normalized;
Vector3 dir;
if (isDirLight)
dir = comp.transform.forward;
else
dir = (cam.transform.position - comp.transform.position).normalized;
Vector3 screenPosZ = WorldToViewport(cam, !isDirLight, isCameraRelative, viewProjMatrix, positionWS + dir * comp.occlusionOffset);

float adjustedOcclusionRadius = isDirLight ? comp.celestialProjectedOcclusionRadius(cam) : comp.occlusionRadius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
#error DOTS Instancing requires the new shader preprocessor. Please enable Caching Preprocessor in the Editor settings!
#endif

// Config defines
// ==========================================================================================
// #define UNITY_DOTS_INSTANCED_PROP_OVERRIDE_DISABLED_BY_DEFAULT





/*
Here's a bit of python code to generate these repetitive typespecs without
a lot of C macro magic
Expand Down Expand Up @@ -100,6 +108,10 @@ for t, c, sz in (
#define UNITY_DOTS_INSTANCING_TYPESPEC_min16float4 H8
#define UNITY_DOTS_INSTANCING_TYPESPEC_SH F128

static const int kDotsInstancedPropOverrideDisabled = 0;
static const int kDotsInstancedPropOverrideSupported = 1;
static const int kDotsInstancedPropOverrideRequired = 2;

#define UNITY_DOTS_INSTANCING_CONCAT2(a, b) a ## b
#define UNITY_DOTS_INSTANCING_CONCAT4(a, b, c, d) a ## b ## c ## d
#define UNITY_DOTS_INSTANCING_CONCAT_WITH_METADATA(metadata_prefix, typespec, name) UNITY_DOTS_INSTANCING_CONCAT4(metadata_prefix, typespec, _Metadata, name)
Expand All @@ -115,20 +127,53 @@ for t, c, sz in (
// underscore in the common case where the property name starts with an underscore.
// A prefix double underscore is illegal on some platforms like OpenGL.
#define UNITY_DOTS_INSTANCED_METADATA_NAME(type, name) UNITY_DOTS_INSTANCING_CONCAT_WITH_METADATA(unity_DOTSInstancing, UNITY_DOTS_INSTANCING_CONCAT2(UNITY_DOTS_INSTANCING_TYPESPEC_, type), name)
#define UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) UNITY_DOTS_INSTANCING_CONCAT2(name, _DOTSInstancingOverrideMode)

#define UNITY_DOTS_INSTANCING_START(name) cbuffer UnityDOTSInstancing_##name {
#define UNITY_DOTS_INSTANCING_END(name) }
#define UNITY_DOTS_INSTANCED_PROP(type, name) uint UNITY_DOTS_INSTANCED_METADATA_NAME(type, name);

#define UNITY_ACCESS_DOTS_INSTANCED_PROP(type, var) LoadDOTSInstancedData_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP(type, arr, var) LoadDOTSInstancedData_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_DOTS_INSTANCED_PROP_OVERRIDE_DISABLED(type, name) static const uint UNITY_DOTS_INSTANCED_METADATA_NAME(type, name) = 0; \
static const int UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) = kDotsInstancedPropOverrideDisabled;

#define UNITY_DOTS_INSTANCED_PROP_OVERRIDE_SUPPORTED(type, name) uint UNITY_DOTS_INSTANCED_METADATA_NAME(type, name); \
static const int UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) = kDotsInstancedPropOverrideSupported;

#define UNITY_DOTS_INSTANCED_PROP_OVERRIDE_REQUIRED(type, name) uint UNITY_DOTS_INSTANCED_METADATA_NAME(type, name); \
static const int UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) = kDotsInstancedPropOverrideRequired;

#ifdef UNITY_DOTS_INSTANCED_PROP_OVERRIDE_DISABLED_BY_DEFAULT
#define UNITY_DOTS_INSTANCED_PROP(type, name) UNITY_DOTS_INSTANCED_PROP_OVERRIDE_DISABLED(type, name)
#else
#define UNITY_DOTS_INSTANCED_PROP(type, name) UNITY_DOTS_INSTANCED_PROP_OVERRIDE_SUPPORTED(type, name)
#endif

#define UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_DISABLED(name) (UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) == kDotsInstancedPropOverrideDisabled)
#define UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_ENABLED(name) (UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) == kDotsInstancedPropOverrideSupported)
#define UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_REQUIRED(name) (UNITY_DOTS_INSTANCED_PROP_OVERRIDE_MODE_NAME(name) == kDotsInstancedPropOverrideRequired)

#define UNITY_ACCESS_DOTS_INSTANCED_PROP(type, var) ( /* Compile-time branches */ \
UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_ENABLED(var) ? LoadDOTSInstancedData_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_REQUIRED(var) ? LoadDOTSInstancedDataOverridden_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: ((type)0) \
)

#define UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(type, var) ( /* Compile-time branches */ \
UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_ENABLED(var) ? LoadDOTSInstancedData_##type(var, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_REQUIRED(var) ? LoadDOTSInstancedDataOverridden_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: (var) \
)

#define UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(type, var) LoadDOTSInstancedData_##type(var, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP_WITH_DEFAULT(type, arr, var) LoadDOTSInstancedData_##type(var, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_CUSTOM_DEFAULT(type, var, default_value) ( /* Compile-time branches */ \
UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_ENABLED(var) ? LoadDOTSInstancedData_##type(default_value, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: UNITY_DOTS_INSTANCED_PROP_IS_OVERRIDE_REQUIRED(var) ? LoadDOTSInstancedDataOverridden_##type(UNITY_DOTS_INSTANCED_METADATA_NAME(type, var)) \
: (default_value) \
)

#define UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_CUSTOM_DEFAULT(type, var, default_value) LoadDOTSInstancedData_##type(default_value, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP_WITH_CUSTOM_DEFAULT(type, arr, var, default_value) LoadDOTSInstancedData_##type(default_value, UNITY_DOTS_INSTANCED_METADATA_NAME(type, var))
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP(type, arr, var) UNITY_ACCESS_DOTS_INSTANCED_PROP(type, var)
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP_WITH_DEFAULT(type, arr, var) UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(type, var)
#define UNITY_ACCESS_DOTS_AND_TRADITIONAL_INSTANCED_PROP_WITH_CUSTOM_DEFAULT(type, arr, var, default_value) UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_CUSTOM_DEFAULT(type, var, default_value)

#define UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES() // No-op by default

#ifdef UNITY_DOTS_INSTANCING_UNIFORM_BUFFER
CBUFFER_START(unity_DOTSInstanceData)
Expand Down Expand Up @@ -374,6 +419,11 @@ type LoadDOTSInstancedData_##type(uint metadata) \
uint address = ComputeDOTSInstanceDataAddress(metadata, sizeof_type); \
return conv(DOTSInstanceData_Load(address)); \
} \
type LoadDOTSInstancedDataOverridden_##type(uint metadata) \
{ \
uint address = ComputeDOTSInstanceDataAddressOverridden(metadata, sizeof_type); \
return conv(DOTSInstanceData_Load(address)); \
} \
type LoadDOTSInstancedData_##type(type default_value, uint metadata) \
{ \
uint address = ComputeDOTSInstanceDataAddressOverridden(metadata, sizeof_type); \
Expand All @@ -387,6 +437,11 @@ type##width LoadDOTSInstancedData_##type##width(uint metadata) \
uint address = ComputeDOTSInstanceDataAddress(metadata, sizeof_type * width); \
return conv(DOTSInstanceData_Load##width(address)); \
} \
type##width LoadDOTSInstancedDataOverridden_##type##width(uint metadata) \
{ \
uint address = ComputeDOTSInstanceDataAddressOverridden(metadata, sizeof_type * width); \
return conv(DOTSInstanceData_Load##width(address)); \
} \
type##width LoadDOTSInstancedData_##type##width(type##width default_value, uint metadata) \
{ \
uint address = ComputeDOTSInstanceDataAddressOverridden(metadata, sizeof_type * width); \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
#define UNITY_SETUP_INSTANCE_ID(input) {\
DEFAULT_UNITY_SETUP_INSTANCE_ID(input);\
SetupDOTSVisibleInstancingData();\
UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES();\
UNITY_SETUP_DOTS_SH_COEFFS; }
#endif

Expand Down
4 changes: 2 additions & 2 deletions Packages/com.unity.render-pipelines.core/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"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": "14.0.8",
"unity": "2022.2",
"version": "14.0.9",
"unity": "2022.3",
"displayName": "Core RP Library",
"dependencies": {
"com.unity.ugui": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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.

## [14.0.8] - 2023-09-27

This version is compatible with Unity 2022.3.11f1.

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

## [14.0.7] - 2023-05-23

This version is compatible with Unity 2022.2.22f1.
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": "14.0.8",
"unity": "2022.2",
"version": "14.0.9",
"unity": "2022.3",
"displayName": "High Definition RP Config",
"dependencies": {
"com.unity.render-pipelines.core": "14.0.8"
"com.unity.render-pipelines.core": "14.0.9"
}
}
71 changes: 71 additions & 0 deletions Packages/com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,77 @@ 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.

## [14.0.8] - 2023-09-27

This version is compatible with Unity 2022.3.11f1.

### Changed
- Improved CPU performances by disabling "QuantizedFrontToBack" sorting in opaque rendering.
- Avoid clamping to integers for HDR manipulation.
- Reduced GC Alloc when using raytracing and HDRP.
- Updated description of Decal Projector Draw Distance setting to mention HDRP asset setting.

### Fixed
- Enabling raytracing no longer disable screen space lighting effect (SSAO, SSR) async compute
- Made HDRP RenderPIpelineSettings public to enable customizing the HDRP asset.
- Properly take into account sky attenuation for baking.
- Updated HDRenderPipelineResources file.
- Fixed HDProbes to support custom resolutions for all rendering modes.
- Fixed TAA aliasing edge issues on alpha output for recorder / green screen. This fix does the following:
* Removes history rejection when the current alpha value is 0. Instead it does blend with the history color when alpha value is 0 on the current plane.
* The reasoning for blending again with the history when alpha is 0 is because we want the color to blend a bit with opacity, which is the main reason for the alpha values. sort of like a precomputed color
* As a safety, we set the color to black if alpha is 0. This results in better image quality when alpha is enabled.
- Added check to ensure gismos arent rendered when they shouldnt be.
- Fixed quad overdraw debug at high resolution.
- Fixed cloud layer rotation does not allow for smooth rotation.
- Fixed GetScaledSize when not using scaling.
- Fixed VT init to avoid RTHandle allocation outside of HDRP rendering loop.
- Upgrading from DLSS 2.4 to DLSS 3.0 for upscaling part.
- [Backport] Fix the incorrect base color of decals for transparency.
- Fixed error when camera goes underwater.
- Fixed shaders stripping for Lens Flares.
- Fixed color pyramid history buffer logic when history is reset and the color pyramid is not required.
- Fixed scene template dependencies.
- Minor fix to HDRP UI when Raytraced AO is enabled.
- Added a new custom pass injection after opaque and sky finished rendering.
- Fixed D3D validation error for area lights in HDShadowAtlas.
- Fixed baked light being wrongly put in the cached shadow atlas.
- Improving DLSS ghosting artifacts a little bit, by using a better pre-exposure parameter. Fixing reset history issues on DLSS camera cuts.
- Added an helpbox for local custom pass volumes that doesn't have a collider attached.
- Respect the transparent reflections settings when using raytracing.
- Show base color texture on decal materials if Affect BaseColor is disabled.
- Fixed inconsistent documentation about hardware supporting raytracing.
- Fixed wrong metapass when using planar/triplanar projection in HDRP.
- Fixed fireflies in path traced volume scattering using MIS. Add support for anisotropic fog.
- When HDRP is disabled, Compute Shaders are being stripped.
- Fixed recovering the current Quality level when migrating a HDRP Asset.
- Added warning to reflection probe editor to prevent user from baking in a low quality level.
- Fixed Decal additive normal blending on shadergraph materials.
- Fixed custom pass injection point "After Opaque And Sky" happening after cloud rendering.
- Fixed FTLP (Fine Tiled Light Pruning) Shader Options max light count. Previous support only supported up to 63 These changes allow to go up to 255 with higher instability as numbers per tile approach 255.
For support greater than 255, do it at your own risk! (and expect some flickering).
- Mixed runtime lights were not considering the intensity multiplier during bakes. These changes fix this behaviour and make bakes more intuitive.
- Fixed the incorrect size of the material preview texture.
- Removing linq and complexity on light units validation
Light units validation was using Linq, which is full of memory allocations and very expensive in the CPU.
Instead, opting to use a simple bitmask to check wether light unit is valid or not for a certain light type.
Caching also managed arrays to avoid in frame allocations.
- Fixed prefab preview rendering dark until moved.
- Fixed material previews being rendered black.
- Fixed: realtime Reflection probe makes volumetrics clouds wind stop.
- Fixed error on water inspector when no SRP is active.
- Fixed preview for refractive materials with MSAA.
- Allow the game to switch HDR on or off during run time.
- Fixed GraphicsBuffer leak from APV binding code.
- Re-enabled HDR output on Mac (Was disabled).
- Fixed Volumetric Fog rendering before the injection point "AfterOpaqueAndSky".
- Fixed an issue where an async pass would try to sync to a culled pass mistakenly.
- Fixed the logic used to set up materials featuring displacement mapping that would sometimes result in artifacts or suboptimal performance.
- Mixed tracing mode for transparent screenspace reflections now mixes both tracing modes as expected, instead of only using ray traced reflections.
- Fixed custom post process volume component example in doc.
- Fixed ShaderGraph Decal material position issue by using world space position.
- Fixed error when assigning non water material to water

## [14.0.7] - 2023-05-23

This version is compatible with Unity 2022.2.22f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ HDRP can output HDR content for displays which support that functionality.

## Enabling HDR Output

To activate HDR output, navigate to **Project Settings > Player** > **Other Settings** and enable **Use display in HDR mode**.
To activate HDR output, navigate to **Project Settings > Player** > **Other Settings** and enable the following settings:

Note that HDR Output will be active only in Game View and in Player. Currently the feature is not working on DirectX 11 on PC, please use DirectX 12 to make use of it.
* **Allow HDR Display Output**
* **Use HDR Display Output**

> **Note**: Only enable **Use HDR Display Output** if you need the main display to use HDR Output.
HDR Output will be active only in Game View and in Player. Currently the feature is not working on DirectX 11 on PC, please use DirectX 12 to make use of it.

## HDR tone mapping in HDRP

Expand Down Expand Up @@ -85,13 +90,13 @@ HDRP offers three debug views for HDR rendering. To access them, navigate to **W

![HDR-Output-GamutView](Images/HDR-Output-GamutView.png)

The triangles in this debug view indicate which parts of two specific color gamuts this Scene covers. The small triangle displays the [Rec709](https://en.wikipedia.org/wiki/Rec._709) gamut values, and the large triangle displays the [Rec2020](https://en.wikipedia.org/wiki/Rec._2020) gamut values. This enables you to check color plot changes while color grading. It can also help you ensure that you benefit from the wider color gamut available in HDR.
The triangles in this debug view indicate which parts of three specific color gamuts this scene covers. The small triangle displays the [Rec709](https://en.wikipedia.org/wiki/Rec._709) gamut values, the medium triangle displays the [P3-D65](https://en.wikipedia.org/wiki/DCI-P3) gamut values, and the large triangle displays the [Rec2020](https://en.wikipedia.org/wiki/Rec._2020) gamut values. This enables you to check color plot changes while color grading. It can also help you ensure that you benefit from the wider color gamut available in HDR.

### Gamut Clip

![HDR-Output-GamutClip](Images/HDR-Output-GamutClip.png)

This debug view indicates the relationship between scene values and specific color gamuts. Areas of the screen outside of the Rec709 color gamut are red, and areas with values within the Rec709 gamut are green.
This debug view indicates the relationship between scene values and specific color gamuts. Areas of the screen with values within the Rec709 gamut are green, areas outside of the Rec709 gamut but inside the P3-D65 gamut are blue, and areas outside of both are red.

### Values exceeding Paper White

Expand All @@ -106,5 +111,6 @@ HDRP only supports HDR Output on the following platforms:
* Windows with DirectX 11, DirectX 12 or Vulkan
* MacOS with Metal
* Consoles
* XR devices with HDR support

> **Note**: DirectX 11 only supports HDR Output in the Player, it does not support HDR Output in the Editor.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ae9e4b7

Please sign in to comment.