-
Notifications
You must be signed in to change notification settings - Fork 855
[ShaderGraph] [2022.1] Making noise nodes platform deterministic #5491
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
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. Shader Graph SRP Core Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
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.
This is going to improve out noise a lot. Thanks, Chris!
…e for random noise generation Based on #5491
…e for random noise generation Based on #5491
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.
Docs changes are in as requested. Seems like a great change, and happy to see it!
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
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.
Forgot I already reviewed because I still had this open. Ignore me
# Conflicts: # com.unity.shadergraph/CHANGELOG.md
Original PR here: #5452
Switched branches so I could rebase off of a passing master build.
Purpose of this PR
Fix for bug: https://fogbugz.unity3d.com/f/cases/1156544/
Console PR: https://github.cds.internal.unity3d.com/unity/ScriptableRenderPipelinePrivate/pull/234
Introduces a set of deterministic integer hashes, with varying input and output dimensions.
These hashes are integer based, so they produce the same result on ALL platforms.
Converted noise nodes to have enum switches to choose between legacy hash behavior, and the new deterministic hashes.
Existing noise nodes will use legacy behavior for backwards compatibility, newly created nodes choose deterministic by default.
New deterministic hashes also have a more random appearance: (legacy hash looks bad on nvidia cards)

Doc ticket added here: https://jira.unity3d.com/browse/GSG-548
Testing status
Added new test cases to the Procedural test scene, to test both legacy and deterministic versions of the noise nodes.
(noise node tests were previously disabled... enabled them)
Validated existing noise nodes upgrade with identical results, using the legacy hashes.

Tested newly created noise nodes, default to deterministic hashes:

Yamato:
ShaderGraph: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252Fnoise2/.yamato%252Fall-shadergraph.yml%2523Nightly_ShaderGraph_2021.2/8494066/job/pipeline
Master: 35e38b1
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/master/.yamato%252Fall-shadergraph.yml%2523Nightly_ShaderGraph_2021.2/8364525/job/pipeline
ShaderGraph Trunk: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252Fnoise2/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_trunk/8664161/job/pipeline
Master: 9f86ed3
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/master/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_trunk/8643605/job/pipeline
Console Tests: 🟡 - same failures as master
https://github.cds.internal.unity3d.com/unity/ScriptableRenderPipelinePrivate/pull/234
Comments to reviewers
Notes for the reviewers you have assigned.