Exposed more option in ShaderGraph surface option + Fix various issue with SG generated code [skip CI]#1022
Merged
sebastienlagarde merged 38 commits intoJun 28, 2020
Conversation
…cular, AddPrecomputedVelocity, TransparentWriteMotionvector and DepthOffset
…S_TRANSPARENT_DEPTH_POSTPASS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose of this PR
build on top of #952 - Reviewer please use the original PR for review, this one include udpated of Material which make it impossible to review.
Purpose of this PR
Unify surface option between SG and non-SG material UI. Thus this PR adds these properties on the material from SG settings:
Opaque UI:

Transparent UI:

In this PR we also ensure that code for double sided and transparent are always generated, so code must match whatever is selected in the shader graph option.
This PR also expose the following mechanism. There is option that can be exposed from Shader graph to Material by "enabling them" those option are the one that require a blockfield.
Then there is option that simply enable pass, if those option aren't enabled on the SG master node, they aren't visible on the material.
under the hood, enabling option allow to force code generation. Regarding transparent depth prepass, this pass is always generated as it is required for SSR transparent. But for Unlit it isn't.
The behavior for alpha clip is now like this:
If SSR transparent is enabled but not transparent depth prepass, then alpha clip with use the regular alpha threshold, otherwise alpha clip will used the transparent depth prepass threshold. The behavior for regular Material haven't change currently, so enabling SSR transparent will use the transparent depth prepass threshold.
Note: With this PR, all pass work with both anykind of lit based material and also with unlit.
Testing status
I tested
Receive SSR,Receive SSR Transparent,Receive Decals,Blend Preserve Specular,Depth Offset,Transparent Write MVon a Lit SG.In addition to Antoine test above I have perform several comparison
Yamato is green:
https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics/tree/HDRP%252Ffeature%252Fexpose-more-surface-material/.yamato%252F_abv.yml%2523all_project_ci_CUSTOM-REVISION/2631327/job