Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Unity LWRP support surface shaders?

Tags:

unity3d

shader

I'm using new Unity's Lightweight rendering pipeline.
After creating a material with a new surface shader, created from the drop-down menu, all I see is a pink color.
There is no information at all about creating shaders for LWRP. It looks like unlit shaders are supported without issues, but what about surface shaders?

like image 594
Taras Kohut Avatar asked Oct 31 '18 21:10

Taras Kohut


People also ask

Are surface shaders supported in lwrp?

According to Feature Comparison Table, Surface Shaders are not supported in LWRP. I didn't find examples of surface shaders migration. Thanks for contributing an answer to Stack Overflow!

What textmeshpro objects work with lwrp?

Any TextMeshPro object that's in world space get's all in one position when I use LWRP. HUD elements work just fine: The texts in the center of screen each should be on the white space of airplanes. If I switch the shader on my font mat to LWRP shaders they work as normal, except they look horrible.

How do I port a surface shader over to the URP?

So if you want to port a surface shader over to the URP, take the surface shader part and put it in a lit frag shader. If you want to see what that might look like, if you look at a surface shader in a standard render pipeline project in the inspector, you'll see a button that says Show Generated Code.

What is surface shaders?

See in Glossary (forward and deferred rendering), and the shader should somehow handle all that complexity. Surface Shaders is a code generation approach that makes it much easier to write lit shaders than using low level vertex/pixel shader programs.


1 Answers

According to Feature Comparison Table, Surface Shaders are not supported in LWRP.

I didn't find examples of surface shaders migration.

Feature                 | Unity Built-in render pipeline | LWRP

Surface Shaders | Yes                                             | Not supported

like image 133
Taras Kohut Avatar answered Sep 28 '22 03:09

Taras Kohut