0
\$\begingroup\$

I am sorry if this question sounds silly. But, I am new to Universal RP shaders, and have to ask this question.


Previously, in my project, I had many beautiful objects that use Mobile shaders.

Today, I upgrade my project to use Universal RP shaders because I have just bought a Unity asset that requires URP shaders. So, I upgrade my project to use URP.

But, after that, all my old objects, which previously used Mobile shaders, now have the PINK color, which means that Mobile shaders do not work for them any more.

Therefore, I have to convert all of my old materials to URP. Now, the problem is that these old objects look much less beautiful than before because they use URP shaders (and NOT the Mobile shaders).


My "silly" question is this: Can we use Universal RP shaders for some objects and Mobile shaders for other objects in a Unity scene ?

If the answer is NO, are there other good alternatives instead ?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ You"ve already learned the answer is no: they turn pink You can probably make a new shader that works with the URP framework and does similar math as the old shaders to get the same look though. To help you with that, we'd need to see how the objects looked with the old shaders, how they look with the new, and what you prefer about the old compared to the new. \$\endgroup\$
    – DMGregory
    Dec 14, 2023 at 12:18

1 Answer 1

1
\$\begingroup\$

No, you can't. Shaders are always developed for a specific render pipeline. And your project can only use one render pipeline at a time. So if you want to migrate your project to the URP, you have to replace all the shaders with URP shaders. Otherwise they are rendered as solid magenta.

When switching render pipelines, then the automatic material conversion is in many cases rather unreliable. And it is often difficult to find a replacement shader that looks exactly like the previous one. Unity recommends the Simple Lit Shader as a drop-in replacement for all the mobile shaders of the build-in pipeline. But not every material property of these shaders has an exact equivalent in this new shader. So it usually takes some experimentation and meticulous tweaking of material parameters to make everything in the game look the same (or at least as good) as before.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .