Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWRP / URP support #368

Closed
dblatner opened this issue Jan 10, 2020 · 12 comments
Closed

LWRP / URP support #368

dblatner opened this issue Jan 10, 2020 · 12 comments
Labels

Comments

@dblatner
Copy link

I'm wondering how the UniGLTF package can be adapted to use Unity's LWRP or URP materials/shaders instead of the standard shaders.

Especially for mobile platforms or Oculus Quest I would expect a great performance boost when switching to LWRP/URP.

@hiroj
Copy link
Contributor

hiroj commented Jan 15, 2020

I want to support it in the future, but I want to know what to do to make the shaders provided by UniVRM work universally with user-defined RendererPipline.

@dblatner
Copy link
Author

When using LWRP / URP you basically only have to change the shaders/materials to a compatible LWRP/URP shader instead of the standard shader. (there's a default standard LWRP / URP shader, too)

As far as I understand the LWRP / URP sets up a setting referencing a "render pipeline" asset. If it's null or empty the Unity standard shaders are used, but if set to another pipeline, then those shaders are used like the ones of the LWRP/URP.

I had a look into the MaterialImporter classes of the UniGLTF package. I think support could be easily added by adding the LWRP / URP shader names to the MaterialImporter types and check whether Legacy Render Pipeline is used or LWRP/URP -> choose appropriate standard shader

@shogoki-vnz
Copy link

+1 to the URP support, I'm porting my project to URP and the performance boost is tremendous but sadly I can't use VRM anymore

@ming436534
Copy link

I just found a kind developer who developed a shader graph version of MToon shader, you can just replace the current shader with that, here is the link: https://github.com/simplestargame/ShaderGraphsMToonForURPVR

@dblatner
Copy link
Author

I just found a kind developer who developed a shader graph version of MToon shader, you can just replace the current shader with that, here is the link: https://github.com/simplestargame/ShaderGraphsMToonForURPVR

Very good! In the referenced repository the author also mentions what needs to be changed to switch to a URP shader instead of the standard shader -> update VRMMaterialImporter to just reference the URP shader by name, that simple :)

@hiroj
Copy link
Contributor

hiroj commented Apr 22, 2020

Thank you for providing information. I actually run it to see if there are any problems.

@MoonGoblinDev
Copy link

I just found a kind developer who developed a shader graph version of MToon shader, you can just replace the current shader with that, here is the link: https://github.com/simplestargame/ShaderGraphsMToonForURPVR

Very good! In the referenced repository the author also mentions what needs to be changed to switch to a URP shader instead of the standard shader -> update VRMMaterialImporter to just reference the URP shader by name, that simple :)

Did you find another solution? I'm using that shader on latest unity 2019 LTS, but the shader seems to be a bit broken, here's my ss : https://imgur.com/a/DElbCIx , anybody have a fix for this issue?

@MoonGoblinDev
Copy link

I just found a kind developer who developed a shader graph version of MToon shader, you can just replace the current shader with that, here is the link: https://github.com/simplestargame/ShaderGraphsMToonForURPVR

Very good! In the referenced repository the author also mentions what needs to be changed to switch to a URP shader instead of the standard shader -> update VRMMaterialImporter to just reference the URP shader by name, that simple :)

Did you find another solution? I'm using that shader on latest unity 2019 LTS, but the shader seems to be a bit broken, here's my ss : https://imgur.com/a/DElbCIx , anybody have a fix for this issue?

Weird problem.. I just found that the broken shader will exist when I try to play the game and the broken shader shape is following my scene window view.. so when my scene view looking at the sky or nothing.. the glitch will disappear

@caxapexac
Copy link

Can you explain please how to use https://github.com/simplestargame/ShaderGraphsMToonForURPVR
It says
" Find VRMMaterialImporter if you use UniVRM package
Edit lines as follows. "
But there is not such file as VRMMaterialImporter in 0.80.0

This is almost 2 years of lack of urp support but still no builtin solution

@rendi88
Copy link

rendi88 commented Aug 31, 2021

yeah it happen in me too and its intermittent
it seems the reflection but just the outline
https://ibb.co/cvmR8DR

@breadnone
Copy link

breadnone commented Sep 10, 2021

I just found a kind developer who developed a shader graph version of MToon shader, you can just replace the current shader with that, here is the link: https://github.com/simplestargame/ShaderGraphsMToonForURPVR

This is okay but not quite. It doesn't have custom lighting or anything to handle lights automatically in URP environment, well it has but far from accurate, it will generate wrong colors unless you map each and every one of them.

Tho adding another layer of filter for light fixes it, but still, its more of a workaround

@ousttrue ousttrue unpinned this issue Sep 10, 2021
@ousttrue
Copy link
Contributor

see #1214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants