Skip to content

Commit a861de4

Browse files
committed
Revert #5297
1 parent 5fe8393 commit a861de4

File tree

8 files changed

+2
-99
lines changed

8 files changed

+2
-99
lines changed

com.unity.render-pipelines.universal/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2424
- Multiply blend now keeps DstAlpha as it's RGB only.
2525
- Particle AlphaModulate() renamed to AlphaModulateAndPremultiply() as it does both. Moved separate AlphaModulate() and AlphaPremultiply() to URP shader library. Fix double alpha multiply for ParticleLit.
2626
- 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.
27+
- Reverted intermediate texture behavior.
2728

2829
### Fixed
2930
- Fixed incorrect premultiply blend mode. case 1260085, case 1357703, [case 1347301](https://issuetracker.unity3d.com/product/unity/issues/guid/1347301/)

com.unity.render-pipelines.universal/Documentation~/upgrade-guide-2021-2.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ If your custom shader implements custom lighting functions, use the function `Ge
7070
In 11.0.x the formula used to apply Shadow Normal Bias has been slightly fix in order to work better with punctual lights.
7171
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.
7272

73-
### Intermediate Texture
74-
75-
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.
76-
77-
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.
78-
79-
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.
8073

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

com.unity.render-pipelines.universal/Documentation~/urp-universal-renderer.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,6 @@ With this check box selected, the Renderer processes the Stencil buffer values.
8888

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

91-
### Compatibility
92-
93-
This section contains settings related to backwards compatibility.
94-
95-
| Property | Description |
96-
|:-|:-|
97-
| **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> |
98-
9991
### Renderer Features
10092

10193
This section contains the list of Renderer Features assigned to the selected Renderer.

com.unity.render-pipelines.universal/Editor/UniversalRendererDataEditor.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ private static class Styles
3434
public static readonly GUIContent shadowTransparentReceiveLabel = EditorGUIUtility.TrTextContent("Transparent Receive Shadows", "When disabled, none of the transparent objects will receive shadows.");
3535
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.");
3636
public static readonly GUIContent clusteredRenderingLabel = EditorGUIUtility.TrTextContent("Clustered (experimental)", "(Experimental) Enables clustered rendering, allowing for more lights per object and more accurate light cullling.");
37-
public static readonly GUIContent intermediateTextureMode = EditorGUIUtility.TrTextContent("Intermediate Texture", "Controls when URP renders via an intermediate texture.");
3837
}
3938

4039
SerializedProperty m_OpaqueLayerMask;
@@ -50,7 +49,6 @@ private static class Styles
5049
SerializedProperty m_PostProcessData;
5150
SerializedProperty m_Shaders;
5251
SerializedProperty m_ShadowTransparentReceiveProp;
53-
SerializedProperty m_IntermediateTextureMode;
5452

5553
#if URP_ENABLE_CLUSTERED_UI
5654
static bool s_EnableClusteredUI => true;
@@ -73,7 +71,6 @@ private void OnEnable()
7371
m_PostProcessData = serializedObject.FindProperty("postProcessData");
7472
m_Shaders = serializedObject.FindProperty("shaders");
7573
m_ShadowTransparentReceiveProp = serializedObject.FindProperty("m_ShadowTransparentReceive");
76-
m_IntermediateTextureMode = serializedObject.FindProperty("m_IntermediateTextureMode");
7774
}
7875

7976
public override void OnInspectorGUI()
@@ -171,14 +168,6 @@ public override void OnInspectorGUI()
171168
EditorGUI.indentLevel--;
172169
EditorGUILayout.Space();
173170

174-
EditorGUILayout.LabelField("Compatibility", EditorStyles.boldLabel);
175-
EditorGUI.indentLevel++;
176-
{
177-
EditorGUILayout.PropertyField(m_IntermediateTextureMode, Styles.intermediateTextureMode);
178-
}
179-
EditorGUI.indentLevel--;
180-
EditorGUILayout.Space();
181-
182171
serializedObject.ApplyModifiedProperties();
183172

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

com.unity.render-pipelines.universal/Runtime/IntermediateTextureMode.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

com.unity.render-pipelines.universal/Runtime/IntermediateTextureMode.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ private static class Profiling
103103
bool m_DepthPrimingRecommended;
104104
StencilState m_DefaultStencilState;
105105
LightCookieManager m_LightCookieManager;
106-
IntermediateTextureMode m_IntermediateTextureMode;
107106

108107
// Materials used in URP Scriptable Render Passes
109108
Material m_BlitMaterial = null;
@@ -144,8 +143,6 @@ public UniversalRenderer(UniversalRendererData data) : base(data)
144143
m_DefaultStencilState.SetFailOperation(stencilData.failOperation);
145144
m_DefaultStencilState.SetZFailOperation(stencilData.zFailOperation);
146145

147-
m_IntermediateTextureMode = data.intermediateTextureMode;
148-
149146
{
150147
var settings = LightCookieManager.Settings.GetDefault();
151148
var asset = UniversalRenderPipeline.asset;
@@ -389,7 +386,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
389386

390387
// Assign the camera color target early in case it is needed during AddRenderPasses.
391388
bool isPreviewCamera = cameraData.isPreviewCamera;
392-
var createColorTexture = m_IntermediateTextureMode == IntermediateTextureMode.Always && !isPreviewCamera;
389+
var createColorTexture = rendererFeatures.Count != 0 && !isPreviewCamera;
393390
if (createColorTexture)
394391
{
395392
m_ActiveCameraColorAttachment = m_ColorBufferSystem.GetBackBuffer();

com.unity.render-pipelines.universal/Runtime/UniversalRendererData.cs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ public sealed class ShaderResources
102102
[SerializeField] bool m_ClusteredRendering = false;
103103
const TileSize k_DefaultTileSize = TileSize._32;
104104
[SerializeField] TileSize m_TileSize = k_DefaultTileSize;
105-
[SerializeField] IntermediateTextureMode m_IntermediateTextureMode = IntermediateTextureMode.Auto;
106105

107106
protected override ScriptableRenderer Create()
108107
{
@@ -236,19 +235,6 @@ internal TileSize tileSize
236235
}
237236
}
238237

239-
/// <summary>
240-
/// Controls when URP renders via an intermediate texture.
241-
/// </summary>
242-
public IntermediateTextureMode intermediateTextureMode
243-
{
244-
get => m_IntermediateTextureMode;
245-
set
246-
{
247-
SetDirty();
248-
m_IntermediateTextureMode = value;
249-
}
250-
}
251-
252238
protected override void OnValidate()
253239
{
254240
base.OnValidate();
@@ -289,33 +275,6 @@ void ISerializationCallbackReceiver.OnBeforeSerialize()
289275

290276
void ISerializationCallbackReceiver.OnAfterDeserialize()
291277
{
292-
if (m_AssetVersion <= 0)
293-
{
294-
var anyNonUrpRendererFeatures = false;
295-
296-
foreach (var feature in m_RendererFeatures)
297-
{
298-
try
299-
{
300-
if (feature.GetType().Assembly == typeof(UniversalRendererData).Assembly)
301-
{
302-
continue;
303-
}
304-
}
305-
catch
306-
{
307-
// If we hit any exceptions while poking around assemblies,
308-
// conservatively assume there was a non URP renderer feature.
309-
}
310-
311-
anyNonUrpRendererFeatures = true;
312-
}
313-
314-
// Replicate old intermediate texture behaviour in case of any non-URP renderer features,
315-
// where we cannot know if they properly declare needed inputs.
316-
m_IntermediateTextureMode = anyNonUrpRendererFeatures ? IntermediateTextureMode.Always : IntermediateTextureMode.Auto;
317-
}
318-
319278
if (m_AssetVersion <= 1)
320279
{
321280
// To avoid breaking existing projects, keep the old AfterOpaques behaviour. The new AfterTransparents default will only apply to new projects.

0 commit comments

Comments
 (0)