Zallist / unity.zallist.universal-simple-lit-shadergraph-target

This plugin simply adds a Simple Lit material (SubTarget) to the Universal target for Shader Graph for URP
Other
85 stars 14 forks source link

Test if this works on URP 12 & URP 14 #3

Closed Zallist closed 2 years ago

Zallist commented 2 years ago

It should just work unless there's something obvious missing in the .hlsl file. Probably just the blend mode preserving specular is broken, which isn't supported on Lit in URP 12 anyway.

bmourit commented 2 years ago

Oddly enough, I was just finishing my own work on ShaderGraph SimpleLit, and right afterward I found you published this to GitHub literally the same day. I guess we are on the same wavelength.

Difference with mine was that I am working in URP 12. I can confirm that the preserve specularity is what prevents yours from working on URP 12. When I get the time I will create a pull request.

I also provide a legacy upgrade path for mine, along with the SimpleLitGBuffer.hlsl for forward rendering path.

I initially used a separate namespace to prevent any conflicts with URP. That may be something worth considering for safety reasons. For the SimpleLitGBuffer a ran into a problem with SurfaceDescriptors to SurfaceData for the function that Unity provides. Maybe I will create a new method all together to convert this, similar to how BRDF has done.

I also stripped out the WorkflowMode functionality, since we work only with specular and it cleaned up the code a bit.

Zallist commented 2 years ago

Isn't time weird.