Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.universal/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.
- Multiply blend now keeps DstAlpha as it's RGB only.
- Particle AlphaModulate() renamed to AlphaModulateAndPremultiply() as it does both. Moved separate AlphaModulate() and AlphaPremultiply() to URP shader library. Fix double alpha multiply for ParticleLit.
- Improved blending modes trigger a material update which tries to keep the existing look intact. This is not always possible and manual blend mode changes might be required.
- Reverted intermediate texture behavior.

### Fixed
- Fixed incorrect premultiply blend mode. case 1260085, case 1357703, [case 1347301](https://issuetracker.unity3d.com/product/unity/issues/guid/1347301/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ If your custom shader implements custom lighting functions, use the function `Ge
In 11.0.x the formula used to apply Shadow Normal Bias has been slightly fix in order to work better with punctual lights.
As a result, to match exactly shadow outlines from earlier revisions, the parameter might to be adjusted in some scenes. Typically, using 1.4 instead of 1.0 for a Directional light is usually enough.

### Intermediate Texture

In previous URP versions, URP performed the rendering via an intermediate Renderer if the Renderer had any active Renderer Features. On some platforms, this had significant performance implications. In this release, URP mitigates the issue in the following way: URP expects Renderer Features to declare their inputs using the `ScriptableRenderPass.ConfigureInput` method. The method provides the information that URP uses to determine automatically whether rendering via an intermediate texture is necessary.

For compatibility purpose, there is a new property **Intermediate Texture** in the Universal Renderer. If you select **Always** in the property, URP uses an intermediate texture. Selecting **Auto** enables the new behavior. Use the **Always** option only if a Renderer Feature does not declare its inputs using the `ScriptableRenderPass.ConfigureInput` method.

To ensure that existing projects work correctly, all existing Universal Renderer assets that were using any Renderer Features (excluding those included with URP) have the option **Always** selected in the **Intermediate Texture** property. Any newly created Universal Renderer assets have the option **Auto** selected.

## Upgrading from URP 7.0.x-7.1.x

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ With this check box selected, the Renderer processes the Stencil buffer values.

For more information on how Unity works with the Stencil buffer, see [ShaderLab: Stencil](https://docs.unity3d.com/Manual/SL-Stencil.html).

### Compatibility

This section contains settings related to backwards compatibility.

| Property | Description |
|:-|:-|
| **Intermediate Texture** | This property lets you force URP to renders via an intermediate texture.<br/>Options: <ul><li>**Auto**: URP uses the information provided by the `ScriptableRenderPass.ConfigureInput` method to determine automatically whether rendering via an intermediate texture is necessary.</li><li>**Always**: forces rendering via an intermediate texture. Use this option only for compatibility with Renderer Features that do not declare their inputs with `ScriptableRenderPass.ConfigureInput`. Using this option might have a significant performance impact on some platforms.</li></ul> |

### Renderer Features

This section contains the list of Renderer Features assigned to the selected Renderer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ private static class Styles
public static readonly GUIContent shadowTransparentReceiveLabel = EditorGUIUtility.TrTextContent("Transparent Receive Shadows", "When disabled, none of the transparent objects will receive shadows.");
public static readonly GUIContent invalidStencilOverride = EditorGUIUtility.TrTextContent("Error: When using the deferred rendering path, the Renderer requires the control over the 4 highest bits of the stencil buffer to store Material types. The current combination of the stencil override options prevents the Renderer from controlling the required bits. Try changing one of the options to Replace.");
public static readonly GUIContent clusteredRenderingLabel = EditorGUIUtility.TrTextContent("Clustered (experimental)", "(Experimental) Enables clustered rendering, allowing for more lights per object and more accurate light cullling.");
public static readonly GUIContent intermediateTextureMode = EditorGUIUtility.TrTextContent("Intermediate Texture", "Controls when URP renders via an intermediate texture.");
}

SerializedProperty m_OpaqueLayerMask;
Expand All @@ -50,7 +49,6 @@ private static class Styles
SerializedProperty m_PostProcessData;
SerializedProperty m_Shaders;
SerializedProperty m_ShadowTransparentReceiveProp;
SerializedProperty m_IntermediateTextureMode;

#if URP_ENABLE_CLUSTERED_UI
static bool s_EnableClusteredUI => true;
Expand All @@ -73,7 +71,6 @@ private void OnEnable()
m_PostProcessData = serializedObject.FindProperty("postProcessData");
m_Shaders = serializedObject.FindProperty("shaders");
m_ShadowTransparentReceiveProp = serializedObject.FindProperty("m_ShadowTransparentReceive");
m_IntermediateTextureMode = serializedObject.FindProperty("m_IntermediateTextureMode");
}

public override void OnInspectorGUI()
Expand Down Expand Up @@ -171,14 +168,6 @@ public override void OnInspectorGUI()
EditorGUI.indentLevel--;
EditorGUILayout.Space();

EditorGUILayout.LabelField("Compatibility", EditorStyles.boldLabel);
EditorGUI.indentLevel++;
{
EditorGUILayout.PropertyField(m_IntermediateTextureMode, Styles.intermediateTextureMode);
}
EditorGUI.indentLevel--;
EditorGUILayout.Space();

serializedObject.ApplyModifiedProperties();

base.OnInspectorGUI(); // Draw the base UI, contains ScriptableRenderFeatures list
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ private static class Profiling
bool m_DepthPrimingRecommended;
StencilState m_DefaultStencilState;
LightCookieManager m_LightCookieManager;
IntermediateTextureMode m_IntermediateTextureMode;

// Materials used in URP Scriptable Render Passes
Material m_BlitMaterial = null;
Expand Down Expand Up @@ -150,8 +149,6 @@ public UniversalRenderer(UniversalRendererData data) : base(data)
m_DefaultStencilState.SetFailOperation(stencilData.failOperation);
m_DefaultStencilState.SetZFailOperation(stencilData.zFailOperation);

m_IntermediateTextureMode = data.intermediateTextureMode;

{
var settings = LightCookieManager.Settings.GetDefault();
var asset = UniversalRenderPipeline.asset;
Expand Down Expand Up @@ -403,7 +400,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re

// Assign the camera color target early in case it is needed during AddRenderPasses.
bool isPreviewCamera = cameraData.isPreviewCamera;
var createColorTexture = m_IntermediateTextureMode == IntermediateTextureMode.Always && !isPreviewCamera;
var createColorTexture = rendererFeatures.Count != 0 && !isPreviewCamera;

// Gather render passe input requirements
RenderPassInputSummary renderPassInputs = GetRenderPassInputs(ref renderingData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public sealed class ShaderResources
[SerializeField] bool m_ClusteredRendering = false;
const TileSize k_DefaultTileSize = TileSize._32;
[SerializeField] TileSize m_TileSize = k_DefaultTileSize;
[SerializeField] IntermediateTextureMode m_IntermediateTextureMode = IntermediateTextureMode.Auto;

protected override ScriptableRenderer Create()
{
Expand Down Expand Up @@ -236,19 +235,6 @@ internal TileSize tileSize
}
}

/// <summary>
/// Controls when URP renders via an intermediate texture.
/// </summary>
public IntermediateTextureMode intermediateTextureMode
{
get => m_IntermediateTextureMode;
set
{
SetDirty();
m_IntermediateTextureMode = value;
}
}

protected override void OnValidate()
{
base.OnValidate();
Expand Down Expand Up @@ -289,33 +275,6 @@ void ISerializationCallbackReceiver.OnBeforeSerialize()

void ISerializationCallbackReceiver.OnAfterDeserialize()
{
if (m_AssetVersion <= 0)
{
var anyNonUrpRendererFeatures = false;

foreach (var feature in m_RendererFeatures)
{
try
{
if (feature.GetType().Assembly == typeof(UniversalRendererData).Assembly)
{
continue;
}
}
catch
{
// If we hit any exceptions while poking around assemblies,
// conservatively assume there was a non URP renderer feature.
}

anyNonUrpRendererFeatures = true;
}

// Replicate old intermediate texture behaviour in case of any non-URP renderer features,
// where we cannot know if they properly declare needed inputs.
m_IntermediateTextureMode = anyNonUrpRendererFeatures ? IntermediateTextureMode.Always : IntermediateTextureMode.Auto;
}

if (m_AssetVersion <= 1)
{
// To avoid breaking existing projects, keep the old AfterOpaques behaviour. The new AfterTransparents default will only apply to new projects.
Expand Down