How to use 3rd Party Shader with LWRP / URP

I have converted my project to use Lightweight Render Pipeline, all materials get converted to use LWRP but materials that support 3rd party shaders, for those what I require to do?

For example, Water Wiggle shader that I have used in my project.

So how to convert this shader into LWRP? or how can I use it in the original form?
Currently, it becomes pink as you see in the above image.

You have to pretty much remake it from scratch, shaders from in-built are not compatible with URP. Thats something you should have looked into before upgrading, its mentioned in all the documentation.

1 Like

So there is no way exist to upgrade custom shader that already present in the project?

No, as mentioned in the documents. Only shaders with an upgrade path will upgrade I.e. shaders using standard features like the standard shader.

1 Like

Sometimes fixing a shader is as simple as adding a tag in the render pass.

But you’ll need to dig into the code and try a few things. Google for “upgrading custom shaders” or similar - there’s a few posts giving some tips.

1 Like

If all you’re doing is adding a tag, things like the SRP Batcher will not work, and if you’re okay with that, you might as well stay with the legacy pipeline.

Not sure I understand. I don’t know much about the SRP batcher. How would it work with a simple fragment shader? What would a basic shader need to do to accomodate the batcher?

This seems to imply that the only benefit of moving to URP is the batcher. Is that really true?

EDIT - I had a quick look at: https://blogs.unity3d.com/2019/02/28/srp-batcher-speed-up-your-rendering/

Speedups were nice but not game-changers.

And the code changes needed to support the batcher don’t look too demanding. So I might modify my suggestion to be “You might just need to add a tag. And you might get some performance boosts of 1.2x to 2x if you spend a bit of time reading up the SRP batcher”

There is a talk from Unite cph that goes through getting a vert frag shader to work properly with URP (srp Batcher and all).

If you are not moving to URP for potentially better performance, why are you moving to URP?

If you are not moving to URP for potentially better performance, why are you moving to URP?

Are you saying “SRP batcher is the only part of URP that gives a performance boost”?

And I can think of a few other reasons someone might want to use URP - future proofing/compatibility, features that are absent or flawed in the Legacy pipeline (Shader Graph springs to mind but I’m sure there are others and the number will continue to grow)

AFAIK There are a lot of platforms and use cases where URP has a hard time competing with legacy, and it will have a even harder time if you skip one of its most beneficial features.

and it will have a even harder time if you skip one of its most beneficial features.

For all we know the shader OP is asking about might only appear in places where performance isn’t critical. As much as you have a point, you’re also making a broad generalisation. My point still stands that sometimes making a shader compatible with URP is simple. I wanted to correct the impression given earlier in this thread that it was nearly impossible without rewriting the entire shader.

Basically I changed my game from the Built-in pipeline to Lightweight render pipeline but there is no performance change I have noticed within my game.
https://play.google.com/store/apps/details?id=com.ubaidussen.drifter

Within my device, before I was getting around 30 fps and after upgrading its same so what is the benefit of changing whole project!!
Though I was using realtime lighting always rather than baked.

I have a PlayStation 4 project with a lot of custom shaders created in ShaderForge. Wondering if I should update to URP - it will break the game visually and replacing the shaders would be a big job. What would be the disadvantages of leaving the game in standard pipeline? I could do with some performance improvement, but sounds like this is not guaranteed with URP.

Personally I didn’t get any change in my game performance - I got the same FPS as before so personally I suggest don’t go for the URP update, remain your project as it is.
Do all other improvements related changes…

URP draws multiple lights in a single pass, compared to built-in’s multipass lighting when using forward rendering and there’s the SRP batcher. The integrated post processing is supposed to be faster too. But that’s about it, and the problem is that there are bugs, so it’s not guaranteed to be faster due to insufficient battle testing. At least with built-in the problems are somewhat known.

1 Like