Skip to content

Exposed more option in ShaderGraph surface option + Fix various issue with SG generated code [skip CI]#1022

Merged
sebastienlagarde merged 38 commits into
HDRP/stagingfrom
HDRP/feature/expose-more-surface-material
Jun 28, 2020
Merged

Exposed more option in ShaderGraph surface option + Fix various issue with SG generated code [skip CI]#1022
sebastienlagarde merged 38 commits into
HDRP/stagingfrom
HDRP/feature/expose-more-surface-material

Conversation

@sebastienlagarde
Copy link
Copy Markdown
Contributor

@sebastienlagarde sebastienlagarde commented Jun 28, 2020

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:

  • DisableDecals
  • DisableSSR
  • DisableSSRTransparent
  • PreserveSpecular
  • AddPrecomputedVelocity
  • TransparentWriteMotionvector
  • DepthOffset

Opaque UI:
image

Transparent UI:
image

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.

  • Alphacutoff
  • AlphaShadow

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.

  • Backface
  • transparent pre/post pass

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 MV on 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

Antoine Lelièvre and others added 30 commits June 17, 2020 17:08
…cular, AddPrecomputedVelocity, TransparentWriteMotionvector and DepthOffset
@sebastienlagarde sebastienlagarde changed the base branch from master to HDRP/staging June 28, 2020 20:15
@sebastienlagarde sebastienlagarde merged commit 7928569 into HDRP/staging Jun 28, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/feature/expose-more-surface-material branch June 28, 2020 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant