Skip to content

Commit 5d1e456

Browse files
authored
Merge pull request #8128 from Unity-Technologies/internal/6000.0/staging
Internal/6000.0/staging
2 parents e93e6c0 + cdb9877 commit 5d1e456

30 files changed

+2140
-36
lines changed

Packages/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ To make a Light work with the **Animation window**, when you click on the **Add
3939

4040
<a name="AreaLight"></a>
4141

42-
| **- Flare Tint** | Controls the tint of the flare of the celestial body. |
43-
| **- Flare Multiplier** | Multiplier applied on the flare intensity. |
42+
| **Property** | **Description** |
43+
| ---------------- | ------------------------------------------------------------ |
44+
| **Flare Tint** | Controls the tint of the flare of the celestial body. |
45+
| **Flare Multiplier** | Multiplier applied on the flare intensity. |
46+
4447
HDRP allows you to use a RenderTexture as a light cookie. However, for the sake of performance, if you make any changes to the RenderTexture, HDRP doesn't automatically update the cookie atlas. To notify the system that the RenderTexture content has changed and so make the system upload the change to the cookie atlas, call `IncrementUpdateCount()` on the RenderTexture. If you don't do this, the system doesn't update the cookie.
4548

4649
## Preset

Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Visual-Environment.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ The Visual Environment Volume component override specifies the **Sky Type** that
44

55
## Using the Visual Environment
66

7-
The **Visual Environment** uses the [Volume](Volumes.md) framework, so to enable and modify **Visual Environment** properties, you must add a **Visual Environment** override to a [Volume](Volumes.md) in your Scene.
7+
The **Visual Environment** uses the [Volume](volume-component.md) framework, so to enable and modify **Visual Environment** properties, you must add a **Visual Environment** override to a [Volume](volume-component.md) in your Scene.
88

9-
The **Visual Environment** override comes as default when you create a **Scene Settings** GameObject (Menu: **GameObject** > **Volumes** > **Sky and Fog Global Volume**). You can also manually add a **Visual Environment** override to any [Volume](Volumes.md). To manually add **Visual Environment** to a Volume:
9+
The **Visual Environment** override comes as default when you create a **Scene Settings** GameObject (Menu: **GameObject** > **Volumes** > **Sky and Fog Global Volume**). You can also manually add a **Visual Environment** override to any [Volume](volume-component.md). To manually add **Visual Environment** to a Volume:
1010

1111
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
1212
2. In the Inspector, go to **Add Override** and select **Visual Environment**.
@@ -25,8 +25,8 @@ You can use the **Visual Environment** override to control the sky and fog for t
2525

2626
| **Property** | **Description** |
2727
| ---------------- | ------------------------------------------------------------ |
28-
| **Sky Type** | Use the drop-down to select the type of sky that HDRP renders when this Volume affects a Camera. This list automatically updates when you [create a custom Sky](Creating-a-custom-sky). <br />&#8226; **None**: HDRP doesn't render a sky for Cameras in this Volume.<br />&#8226; [Gradient Sky](Override-Gradient-Sky.md): Renders the top, middle, and bottom sections of the sky using three separate color zones. HDRP controls the size of these color zones using the Gradient Sky’s **Gradient Diffusion** property.<br />&#8226; [HDRI Sky](Override-HDRI-Sky.md): Uses a cubemap texture to represent the entire sky.<br />&#8226; [Physically Based Sky](Override-Physically-Based-Sky.md): Simulates the sky of a spherical planet with a two-part atmosphere which has an exponentially decreasing density with respect to its altitude.<br />&#8226; [Procedural Sky](Override-Procedural-Sky.md): Generates a sky based on properties such as, **Sky Tint**, **Ground Color**, and **Sun Size**. HDRP deprecated **Procedural Sky** in 2019.3 and replaced it with **Physically Based Sky**. To use Procedural Sky for HDRP Projects in Unity 2019.3 or later, follow the instructions on the [Upgrading from 2019.2 to 2019.3 guide](Upgrading-From-2019.2-to-2019.3.md#ProceduralSky).<br /><br />Note: If you select any option that's not **None**, make sure the respective sky [Volume override](Volume-Components.md) exists in a Volume in you Scene. For example, if you select **Gradient Sky**, your Scene must contain a Volume with a [Gradient Sky](Override-Gradient-Sky.md) override. |
29-
| **Background Clouds** | Use the drop-down to select the type of clouds that HDRP renders when this Volume affects a Camera. The options are:<br/>&#8226; **None**: Doesn't render any clouds.<br/>&#8226; **Cloud Layer**: Renders clouds using the [Cloud Layer system](Override-Cloud-Layer.md).<br/>This list automatically updates when you [create custom clouds](Creating-Custom-Clouds.md).<br/>For more information, refer to the [clouds in HDRP documentation](Clouds-In-HDRP.md). |
28+
| **Sky Type** | Use the drop-down to select the type of sky that HDRP renders when this Volume affects a Camera. This list automatically updates when you [create a custom Sky](create-a-custom-sky.md). <br />&#8226; **None**: HDRP doesn't render a sky for Cameras in this Volume.<br />&#8226; [Gradient Sky](gradient-sky-volume-override-reference.md): Renders the top, middle, and bottom sections of the sky using three separate color zones. HDRP controls the size of these color zones using the Gradient Sky’s **Gradient Diffusion** property.<br />&#8226; [HDRI Sky](hdri-sky-volume-override-reference.md): Uses a cubemap texture to represent the entire sky.<br />&#8226; [Physically Based Sky](physically-based-sky-volume-override-reference.md): Simulates the sky of a spherical planet with a two-part atmosphere which has an exponentially decreasing density with respect to its altitude.<br />&#8226; Procedural Sky: Generates a sky based on properties such as, **Sky Tint**, **Ground Color**, and **Sun Size**. HDRP deprecated **Procedural Sky** in 2019.3 and replaced it with **Physically Based Sky**. To use Procedural Sky for HDRP Projects in Unity 2019.3 or later, follow the instructions on the [Upgrading from 2019.2 to 2019.3 guide](Upgrading-From-2019.2-to-2019.3.md#ProceduralSky).<br /><br />Note: If you select any option that's not **None**, make sure the respective sky [Volume override](volume-component.md) exists in a Volume in you Scene. For example, if you select **Gradient Sky**, your Scene must contain a Volume with a [Gradient Sky](gradient-sky-volume-override-reference.md) override. |
29+
| **Background Clouds** | Use the drop-down to select the type of clouds that HDRP renders when this Volume affects a Camera. The options are:<br/>&#8226; **None**: Doesn't render any clouds.<br/>&#8226; **Cloud Layer**: Renders clouds using the [Cloud Layer system](cloud-layer-volume-override-reference.md).<br/>This list automatically updates when you [create custom clouds](create-custom-cloud-effects.md).<br/>For more information, refer to the [clouds in HDRP documentation](clouds.md). |
3030
| **Ambient Mode** | Use the drop-down to select the mode this Volume uses to process ambient light.<br />&#8226; **Static**: Ambient light comes from the baked sky assigned to the **Static Lighting Sky** property in the Lighting window. This light affects both real-time and baked global illumination. For information on how to set up environment lighting, see the [Environment Lighting documentation](Environment-Lighting.md#lighting-environment).<br />&#8226; **Dynamic**: Ambient light comes from the sky that you set in the **Sky** > **Type** property of this override. This means that ambient light can change in real time depending on the current Volume affecting the Camera. If you use baked global illumination, changes to the environment lighting only affect GameObjects exclusively lit using Ambient Probes. If you use real-time global illumination, changes to the environment lighting affect both lightmaps and Ambient Probes. |
3131

3232
### Planet
@@ -54,6 +54,6 @@ After you have set your **Sky Type**, if you want to override the default settin
5454
* To disable the override, disable the checkbox to the left of the **Procedural Sky** title .
5555
* To remove the override, click the drop-down menu to the right of the title and select **Remove** .
5656

57-
On the [Gradient Sky](Override-Gradient-Sky.md) override itself, you can enable the checkboxes next to each property to override the property with your own values. For example, enable the checkbox next to the **Middle** property and use the color picker to change the color to pink.
57+
On the [Gradient Sky](gradient-sky-volume-override-reference.md) override itself, you can enable the checkboxes next to each property to override the property with your own values. For example, enable the checkbox next to the **Middle** property and use the color picker to change the color to pink.
5858

5959
![](Images/Override-VisualEnvironment2.png)

Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl

+15-7
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,28 @@ SHADOW_TYPE EvaluateShadow_Directional( LightLoopContext lightLoopContext, Posit
323323
}
324324
else if (shadowSplitIndex == int(_CascadeShadowCount) - 1)
325325
{
326-
// float fade = lightLoopContext.shadowContext.fade;
327-
float3 camToPixel = posInput.positionWS - GetPrimaryCameraPosition();
328-
float distanceCamToPixel2 = dot(camToPixel, camToPixel);
329-
330-
HDDirectionalShadowData dsd = lightLoopContext.shadowContext.directionalShadowData;
331-
float fade = saturate(distanceCamToPixel2 * dsd.fadeScale + dsd.fadeBias);
326+
float fade = lightLoopContext.shadowContext.fade;
332327
// In the transition code (both dithering and blend) we use shadow = lerp( shadow, 1.0, fade ) for last transition
333328
// mean if we expend the code we have (shadow * (1 - fade) + fade). Here to make transition with shadow mask
334329
// we will remove fade and add fade * shadowMask which mean we do a lerp with shadow mask
335330
shadow = shadow - fade + fade * shadowMask;
336331
}
337332

338333
// See comment in EvaluateBSDF_Punctual
339-
shadow = light.nonLightMappedOnly ? min(shadowMask, shadow) : shadow;
334+
if (light.nonLightMappedOnly)
335+
{
336+
shadow = min(shadowMask, shadow);
337+
}
338+
else
339+
{
340+
// Use shadowmask when shadow value ​​cannot be retrieved due to shadow caster culling.
341+
float3 camToPixel = posInput.positionWS - GetPrimaryCameraPosition();
342+
float distanceCamToPixel2 = dot(camToPixel, camToPixel);
343+
344+
HDDirectionalShadowData dsd = lightLoopContext.shadowContext.directionalShadowData;
345+
float alpha = saturate(distanceCamToPixel2 * dsd.fadeScale + dsd.fadeBias);
346+
shadow = min(shadow, lerp(1.0, shadowMask, alpha * alpha));
347+
}
340348
#endif
341349

342350
shadow = lerp(shadowMask.SHADOW_TYPE_REPLICATE, shadow, light.shadowDimmer);

Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ IndirectLighting EvaluateBSDF_ScreenSpaceReflection(PositionInputs posInput,
17911791
//
17921792
// Note that the SSR with clear coat is a binary state, which means we should never enter the if condition if we don't have an active
17931793
// clear coat (which is not guaranteed by the HasFlag condition in deferred mode in some cases). We then need to make sure that coatMask is actually non zero.
1794-
if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_CLEAR_COAT) && bsdfData.coatMask > 0.0)
1794+
if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_CLEAR_COAT) && bsdfData.coatMask >= 0.0)
17951795
{
17961796
// We use the coat-traced light according to how similar the base lobe roughness is to the coat roughness
17971797
// (we can assume the coat is always smoother):

Packages/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl

+2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn
152152
GENERIC_ALPHA_TEST(hole, 0.5);
153153
#endif
154154

155+
#ifndef EDITOR_VISUALIZATION
155156
// terrain lightmap uvs are always taken from uv0
156157
input.texCoord1 = input.texCoord2 = input.texCoord0;
158+
#endif
157159

158160
TerrainLitSurfaceData terrainLitSurfaceData;
159161
InitializeTerrainLitSurfaceData(terrainLitSurfaceData);

Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/LineRendering/Core/LineRendering.cs

+3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ internal void Cleanup()
101101

102102
CleanupShadingAtlas();
103103

104+
m_ShaderVariablesBuffer?.Release();
105+
m_ShaderVariablesBuffer = null;
106+
104107
m_IsInitialized = false;
105108
}
106109

Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs

+6-8
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
720720
UpdateCameraHistory(cameraData);
721721

722722
// Gather render pass input requirements
723-
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled);
723+
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera);
724724

725725
// Gather render pass require rendering layers event and mask size
726726
bool requiresRenderingLayer = RenderingLayerUtils.RequireRenderingLayers(this, rendererFeatures,
@@ -753,11 +753,6 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
753753
if (renderingLayerProvidesByDepthNormalPass)
754754
renderPassInputs.requiresNormalsTexture = true;
755755

756-
#if UNITY_EDITOR
757-
if (ProbeReferenceVolume.instance.IsProbeSamplingDebugEnabled())
758-
renderPassInputs.requiresNormalsTexture = true;
759-
#endif
760-
761756
// TODO: investigate the order of call, had to change because of requiresRenderingLayer
762757
if (m_DeferredLights != null)
763758
{
@@ -1719,7 +1714,7 @@ private struct RenderPassInputSummary
17191714
internal RenderPassEvent requiresDepthTextureEarliestEvent;
17201715
}
17211716

1722-
private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, bool postProcessingEnabled)
1717+
private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, bool postProcessingEnabled, bool isSceneViewCamera)
17231718
{
17241719
RenderPassInputSummary inputSummary = new RenderPassInputSummary();
17251720
inputSummary.requiresDepthNormalAtEvent = RenderPassEvent.BeforeRenderingOpaques;
@@ -1774,7 +1769,10 @@ private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, boo
17741769
inputSummary.requiresDepthTextureEarliestEvent = (RenderPassEvent)Mathf.Min((int)m_MotionVectorPass.renderPassEvent, (int)inputSummary.requiresDepthTextureEarliestEvent);
17751770
}
17761771

1777-
1772+
#if UNITY_EDITOR
1773+
if (ProbeReferenceVolume.instance.IsProbeSamplingDebugEnabled() && isSceneViewCamera)
1774+
inputSummary.requiresNormalsTexture = true;
1775+
#endif
17781776
return inputSummary;
17791777
}
17801778

Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs

+2-7
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera
424424
// Gather render pass history requests and update history textures.
425425
UpdateCameraHistory(cameraData);
426426

427-
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled);
427+
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera);
428428

429429
// Enable depth normal prepass if it's needed by rendering layers
430430
if (m_RenderingLayerProvidesByDepthNormalPass)
@@ -1137,16 +1137,11 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co
11371137

11381138
RecordCustomRenderGraphPasses(renderGraph, RenderPassEvent.BeforeRenderingPrePasses);
11391139

1140-
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled);
1140+
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera);
11411141

11421142
if (m_RenderingLayerProvidesByDepthNormalPass)
11431143
renderPassInputs.requiresNormalsTexture = true;
11441144

1145-
#if UNITY_EDITOR
1146-
if (ProbeReferenceVolume.instance.IsProbeSamplingDebugEnabled() && cameraData.isSceneViewCamera)
1147-
renderPassInputs.requiresNormalsTexture = true;
1148-
#endif
1149-
11501145
bool isDeferred = this.renderingModeActual == RenderingMode.Deferred;
11511146

11521147
bool requiresDepthPrepass = RequireDepthPrepass(cameraData, ref renderPassInputs);

Packages/com.unity.render-pipelines.universal/Shaders/2D/Sprite-Unlit-Default.shader

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ Shader "Universal Render Pipeline/2D/Sprite-Unlit-Default"
126126
#pragma vertex UnlitVertex
127127
#pragma fragment UnlitFragment
128128

129+
#pragma multi_compile _ SKINNED_SPRITE
129130
#pragma multi_compile_fragment _ DEBUG_DISPLAY
130131

131132
struct Attributes

Packages/com.unity.visualeffectgraph/Documentation~/TableOfContents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* [14 / Unity 2022.2](whats-new-14.md)
99
* [15 / Unity 2023.1](whats-new-15.md)
1010
* [16 / Unity 2023.2](whats-new-16.md)
11-
* [17 / Unity 2023.3](whats-new-17.md)
11+
* [17 / Unity 6](whats-new-17.md)
1212
* [Getting Started](GettingStarted.md)
1313
* [Visual Effect Graph Assets](VisualEffectGraphAsset.md)
1414
* [Visual Effect Graph Window](VisualEffectGraphWindow.md)

Packages/com.unity.visualeffectgraph/Documentation~/whats-new-17.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# What's new in version 17 / Unity 2023.3
1+
# What's new in version 17 / Unity 6
22

3-
This page contains an overview of new features, improvements, and issues resolved in version 17 of the Visual Effect Graph, embedded in Unity 2023.3.
3+
This page contains an overview of new features, improvements, and issues resolved in version 17 of the Visual Effect Graph, embedded in Unity 6.
44

55
## Added
66

7-
The following is a list of features Unity added to version 17 of the Visual Effect Graph embedded in Unity 2023.3. Each entry includes a summary of the feature and a link to any relevant documentation.
7+
The following is a list of features Unity added to version 17 of the Visual Effect Graph embedded in Unity 6. Each entry includes a summary of the feature and a link to any relevant documentation.
88

99
### URP Camera Buffer
1010

@@ -59,7 +59,7 @@ The [Shortcut Manager](https://docs.unity3d.com/2023.3/Documentation/Manual/Shor
5959

6060
<video src="Images/whatnew_17_BlockBanner.mp4" width="700" height="auto" autoplay="true" loop="true" controls></video>
6161

62-
The following is a list of improvements Unity made to the Visual Effect Graph in version 17, embedded in Unity 2023.3. Each entry includes a summary of the improvement and, if relevant, a link to any documentation.
62+
The following is a list of improvements Unity made to the Visual Effect Graph in version 17, embedded in Unity 6. Each entry includes a summary of the improvement and, if relevant, a link to any documentation.
6363

6464
### Collider Shape Blocks:
6565
[Collider blocks](https://docs.unity3d.com/Packages/[email protected]/manual/Block-CollideWithSphere.html) have been combined so that you can easily switch between shapes. Several options have been added, and stability and accuracy have been greatly improved.

Packages/com.unity.visualeffectgraph/Documentation~/whats-new.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ The list of pages is as follows:
1111
- [14 / Unity 2022.2](whats-new-14.md)
1212
- [15 / Unity 2023.1](whats-new-15.md)
1313
- [16 / Unity 2023.2](whats-new-16.md)
14-
- [17 / Unity 2023.3](whats-new-17.md)
14+
- [17 / Unity 6](whats-new-17.md)
1515

0 commit comments

Comments
 (0)