Unity should combine URP and HDRP as a single RP.

Regardless of if it’s good or bad to have separate pipelines, at this point combining them would result in a tumultuous multi-year period with zero new features, awful stability and painful conversion processes.

1 Like

maybe try this to get URP and HDRP to be combined…i havn’t tried it yet, just wrote it…but i would imagine putting this on a game object…maybe…if not im going to scriptable render pipeline…lol

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using UnityEngine.Rendering.HighDefinition;

public class CombinedRenderPipeline : MonoBehaviour
{
// Reference to the URP renderer
private UniversalRenderPipelineAsset urpAsset;

// Reference to the HDRP renderer
private HDRenderPipelineAsset hdrpAsset;

private void Start()
{
// Get references to the URP and HDRP assets
urpAsset = GraphicsSettings.renderPipelineAsset as UniversalRenderPipelineAsset;
hdrpAsset = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset;

if (urpAsset != null)
{
// URP is active, configure it to support HDRP features

// Disable any URP specific settings that conflict with HDRP
urpAsset.supportsHDR = false;

// Enable required HDRP features
hdrpAsset.supportsHDR = true;

// Configure other HDRP-specific settings if needed

// Set the active render pipeline asset to HDRP
GraphicsSettings.renderPipelineAsset = hdrpAsset;
GraphicsSettings.SetRenderPipelineSettings(new HDRenderPipelineAsset.RenderPipelineSettings());
}
else if (hdrpAsset != null)
{
// HDRP is active, configure it to support URP features

// Disable any HDRP specific settings that conflict with URP
hdrpAsset.supportsHDR = false;

// Enable required URP features
urpAsset.supportsHDR = true;

// Configure other URP-specific settings if needed

// Set the active render pipeline asset to URP
GraphicsSettings.renderPipelineAsset = urpAsset;
GraphicsSettings.SetRenderPipelineSettings(new UniversalRenderPipelineAsset.RenderPipelineSettings());
}

// Tell Unity to reimport materials and textures to reflect the changes
AssetDatabase.Refresh();
}
}

Does that actually accomplish anything? I was under the impression that HDRP and URP use completely different shaders that are not compatible with each other, so it seems like you’d need to rebuild every material from scratch and probably any backed-lighting data as well.

FWIW, I don’t think “combining” them is a good idea.

But wrapping them using a common abstraction layer is, imho, the way they should have been designed in the first place. This would have allowed to write basic stuff that works across all pipelines, and simple conversion between pipelines w/ smooth feature fallbacks (eg. features from HDRP that are not available in URP are either replaced by a cheaper alternative or removed, without breaking the entire project).

This is kinda what ShaderGraph is, but only for shaders, and at a too high level of abstraction: can’t hand-write shaders that can be compiled for all pipelines.

I came here to know which RP I should go forth with … and now I still don’t know.
Some companies I collaborate with told me “Go with URP because it’s what will get the most in the long term”, and I kinda believe that, I mean, most of Unity Market is mobile / indies.
On the other hand we’re aiming for High End PCs and Consoles … but I’m afraid of being stuck with a dead pipeline always in an experimental stage due to the lack or resources or, simply, users.

In the meanwhile I’m considering using Jason’s Better Lit Shader as an abstraction Layer … howewer it won’t work for RP specific shaders. Not mentioning the risk it is to rely on a sole dev stitching the RPs each time they get updated.

I’m even considering switching to UE, which will be costly, just to get rid of all this non-sens.

iPhone 15 now also has hardware raytracing, opening it up to the main stream. I hope URP will get an easy way to enable it.