Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Siccity,
Thanks for this great tool.
I started by improving the ShaderGraphs shaders to be feature complete and fixed some issues (see commit messages). You should be able to merge the first two commits as is.
After completing that, I found out the performance of those shaders is subpar, so I also modified the URP Lit shader to better support the glTF spec.
I changed the MetalRough, Occlusion and SpecGloss texture maps to the following:
Metallic (B), Roughness (1.0f - G), Occlusion (R).
Specular setup: Specular (RGB), Gloss (A). Occlusion (R)
The rest of the shader is the same and references the URP 'library' files directly.
I also added a helper class to setup the correct keywords depending on active textures, colors and modes. This is almost just a copy of BaseShaderGUI.cs (which is not available at runtime) from the URP package.
I changed the default URP ShaderSettings to use this modified Lit shader instead of the ShaderGraph shaders.
My main concern with this approach is cross-version support with different URP package versions. This Lit.shader and LitInput.hlsl was copied from URP 7.3.1 (Unity 2019.4.8f1). One solution could be to have separate shaders for each URP version with breaking changes.