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
[VFX] Fix new SG integration while using keywords #6912
[VFX] Fix new SG integration while using keywords #6912
Conversation
... but it doesn't work since Predefined is ignoring the default value See https://unity.slack.com/archives/C3KQ4UD6V/p1638975568233000
…mpatible-shader-variant
…mpatible-shader-variant
com.unity.render-pipelines.high-definition/Editor/VFXGraph/VFXHDRPBinder.cs
Outdated
Show resolved
Hide resolved
…mpatible-shader-variant # Conflicts: # com.unity.visualeffectgraph/CHANGELOG.md
Resolve issue #6912 (comment)
|
Hi! Dropping WIP Test Doc. Jotted down several questions. |
…mpatible-shader-variant # Conflicts: # com.unity.visualeffectgraph/CHANGELOG.md
…mpatible-shader-variant
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.
Thanks for addressing this!
All raised concerns were fixed, couldn't find any other oustanding behavior specific to VFX. Resharing Test Doc for visibility.
…mpatible-shader-variant
…mpatible-shader-variant
|
Moving to internal : https://github.cds.internal.unity3d.com/unity/unity/pull/8564 |
Purpose of this PR
Fix this fogbugz
Testing status
New GraphicTest (which is actually duplicated between URP & HDRP)

Update image in internal using results from this job and this jobDone at https://github.cds.internal.unity3d.com/unity/ScriptableRenderPipelinePrivate/pull/372Manual test for error feedback (N.B.: I noticed the refresh of UX was sometime failing, not sure about the repro)
_error_feedback_sg.mp4
Comments to reviewers
About needed change in ShaderGraph code generation
Without the modification in
ShaderSpliceUtil.cs, the generated code ends with:The keyword generation is adding the
#ifcondition but the content was already a$include(see here)See also this conversation about usage of keyword with VFX
About ShaderGraph allowed usage in VFX
The behavior has been fine tuned ⬇️
🔴 : Error
🟠 : Warning
🟢 : Allowed
Before
In case of error, we were fallbacking to an unexpected shader generation which can lead to a black material in HDRP or compilation error in URP.
After
In case of error, the output is discared from the compilation. When it's a warning, the generation is proceeding but there is an error feedback in VFX (the
Debug.LogWarningis kept since these problems can occurs with ShaderGraph modification)About error feedback from compilation
We were already following a pattern Begin()/End() with SetupCompilation()/EndCompilation().
I added a way to collect and store errors/warnings during compilation to supply them in
GenerateErrors.It also affects the old shader graph integration when a shader graph Lit is used on Unlit output and vice versa.
Additionnal Note
Known issue about missing inspector UX from material (see 1388531), the problem landed in 2022.2.0a1.9_e743b07bbaa9