-
Notifications
You must be signed in to change notification settings - Fork 858
[7.x.x] Add SpeedTree8 shadergraph to HDRP and URP #3789
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
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDShaderUtils.cs
Outdated
Show resolved
Hide resolved
...nity.render-pipelines.high-definition/Editor/Material/Nature/HDSpeedTree8MaterialUpgrader.cs
Outdated
Show resolved
Hide resolved
adrien-de-tocqueville
left a comment
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.
the material keyword reset code lgtm
|
Am I right in assuming that this PR effectively targets 19.4? |
|
@kroatoa Since shadergraph is not backwards compatible, I started with 19.4 and am making PRs for later versions as I get them ready. I will have a 20.2 PR up later today, but it's not tracked anywhere outside my worklog for now. :) |
|
10.x.x version here. No changes from 7.x.x. #3861 |
kroatoa
left a comment
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 clarifying
|
@kroatoa I have some API changes that will require incrementing package versions for Core and HDRP. How do I decide whether to increment minor or major versions? Who do I need to get approval from for incrementing the versions of those packages? |
|
Did the PR to master landed? I can only find this one but it was closed: #3713 |
|
@phi-lira No, I am remaking it. I can have a new PR to master up today. I started with 19.4 since Shadergraph isn't backwards compatible, so it was easier to work from 19.4 and go forward. |
branch outputs based on whether or not it's a billboard.
SpeedTree8MaterialUpgrader.
universal ST8 shader. Convert backface normal enable to enum.
now mirror. Double sided is disabled for billboard.
fa1d428 to
2071a30
Compare
Please reach out to the RM for the branch you are targeting. if it's more than one you can also put a post in #release-management, and we'll take it from there. |
Please read the Contributing guide before making a PR.
Checklist for PR maker
need-backport-*label. After you backport the PR, the label changes tobackported-*.CHANGELOG.mdfile.Purpose of this PR
Adding SpeedTree8 support (including material upgrader) to HDRP.
Added the SpeedTree8 shadergraph to URP as well, though the default is still the original SpeedTree8 shader pending wind support in the shadergraph.
Added a graphics test in HDRP for SpeedTree8. Also added SpeedTrees to the terrainlit and terrainbaselit test scenes.
TODO: Move SpeedTree8MaterialUpgrader from Core to Shadergraph package? -> Even invoking MaterialUpgrader using Core.Editor.MaterialUpgrader does not find the class from the shadergraph package, for some reason. Why?
Testing status
Tested importing and material upgrading in HDRP. It works, except for an issue with embedded materials where when the Library is nuked, the materials don't get setup properly. This is because the speedtree asset is imported before the HDRP asset is imported, so the correct shader is not grabbed, and the correct postprocessing is not run. This is a recurring issue and topic of discussion not unique to SpeedTree, so it should not be blocking for this PR.
For URP, tested that manually switching over the shader works as expected. No upgrader or importer support for the shadergraph is needed yet as it is not yet the default shader.
Comments to reviewers
@LandonTownsendUnity do you mind checking if the normal flipping is behaving as you'd expect in HDRP?
@adrien-de-tocqueville for changes to HDShaderUtils.ResetMaterialKeywords.
@cdxntchou for placement of files within shadergraph and core packages. Notably, LODCrossfade is not specific to SpeedTree. Maybe it should be placed someplace else/exposed generally somehow?
@phi-lira for feedback on adding the shadergraph to Universal and not hooking it up since it's not intended to replace the default yet.