-
Notifications
You must be signed in to change notification settings - Fork 792
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
Fixed the built-in target to have collapsible menus to match other pipeline #4884
Conversation
…pelines. Fixes fogbugs 1339256 This required adding an assembly dependency on core/Editor for shader graph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll follow this up with the "Queue Control" stuff I added to the URP material inspector.
Sufficient testing for the original bugfix. I have a couple questions for the secondary issue you found during this though.
Was this specifically just an issue for Built-In like the original bugfix? It kind of looks like @jessebarker is referencing he's fixing it in URP as well. |
Yes this was just a bug in built-in. Jesse is fixing an independent issue in URP (which will also need to be fixed, but after my change). High level I had made the sorting priority field but it wasn't being used. Jesse is fixing how the render queue gets applied, either always from shader (which then uses the priority) or manually controlled. I don't think we can create a test for this as it'd involve verifying that changing the sort priority on the inspector also changes the render queue value, but maybe I'm wrong. I haven't seen any tests for this kind of control yet. |
Right. What I did for the URP shader GUI in !4610 + !4920 was fixed a bug where the material settings were sort of stepping on each other, so I enabled a new "queue control" setting to allow the user to choose between the hand-written (Lit.shader, Unlit.shader) shader behavior, and the flexibility of the shader graph behavior unambiguously. Once this PR goes in, I can apply that same behavior to the built-in target and shader GUI so it will "match" URP (not in all actual rendering behavior due to pipeline differences, but in UX/UI at least). In theory, Josh could do that on this PR, but it would make it much larger, and I think we'd prefer to keep them separate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this specifically just an issue for Built-In like the original bugfix? It kind of looks like @jessebarker is referencing he's fixing it in URP as well.
Is this something we could create Unit test(s) for?Yes this was just a bug in built-in. Jesse is fixing an independent issue in URP (which will also need to be fixed, but after my change). High level I had made the sorting priority field but it wasn't being used. Jesse is fixing how the render queue gets applied, either always from shader (which then uses the priority) or manually controlled.
Right. What I did for the URP shader GUI in !4610 + !4920 was fixed a bug where the material settings were sort of stepping on each other, so I enabled a new "queue control" setting to allow the user to choose between the hand-written (Lit.shader, Unlit.shader) shader behavior, and the flexibility of the shader graph behavior unambiguously. Once this PR goes in, I can apply that same behavior to the built-in target and shader GUI so it will "match" URP (not in all actual rendering behavior due to pipeline differences, but in UX/UI at least). In theory, Josh could do that on this PR, but it would make it much larger, and I think we'd prefer to keep them separate.
Ah, I see! Thanks for the additional context. Also thank you for linking the other PR's as well, I took a look into them and read up a bit more and that cleared up what your discussions were about!
Passing green nightly run before merging to fix changelog: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Fbuiltin-material-inspector/.yamato%252Fall-shadergraph.yml%2523Nightly_ShaderGraph_trunk/7286748/job |
Please read the Contributing guide before making a PR.
Checklist for PR maker
CHANGELOG.md
file.Purpose of this PR
Why is this PR needed, what hard problem is it solving/fixing?
https://fogbugz.unity3d.com/f/cases/1339256/
The material inspector for shader graph built-in target shader didn't have collapsible menus like URP did. This required a new assembly reference on the srp.core/editor assembly which was deemed fine.
Additionally a small bug with sorting priority not working and not always being exposed was fixed.
Testing status
Comments to reviewers
Currently some options are duplicated in the Surface Options setting. This is being handled in another PR
"Enable GPU Instancing" wasn't added in the Advanced Options section as it doesn't currently work (I believe).
You can currently manually set the RenderQueue to "From Shader" which is fine.
An assembly reference to srp.core/editor was added to shader graph so
MaterialHeaderScopeList
can be used.