-
Notifications
You must be signed in to change notification settings - Fork 858
[10.x.x] Add SpeedTree8 shadergraph to HDRP and URP #3861
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
|
Sorry about the missclick ! Marked the PR as ready by mistake, but it looks like I cannot remove the reviewers that were automatically added |
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.
Looks the same as the PR for 7.x.x
subshadergraphs in ShaderGraph and MaterialUpgrader in core. Add a test to HDRP for speedtree8.
LODCrossfade explaining its redundancy with existing Common.hlsl code.
LODDitheringTransition function.
Looks great! Thank you. (In general I would avoid passive voice, but you've already revised that sentence once, and it isn't worth nitpicking that much in a changelog. ) |
ValGrimm-U3D
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 responding to my many questions and suggestions, fine to merge. 👍
JMargevics
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.
https://confluence.unity3d.com/pages/viewpage.action?pageId=129564990 Test doc includes coverage of this backport. No specific issues were found, looks good from HDRP side ✅
|
Remaining failures are all hybrid failures discussed here, and are not due to my PR: |
erikabar
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.
we do not have QA bandwidth right now, we will test this after feature cutoff.
when is that? |
|
@erikabar Do you have an ETA on when we could get a URP QA review? |
|
status update: I will finish testing by tomorrow noon |
erikabar
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.
Tested URP SpeedTree8_PBRLit shadergraph, everything works as expected in the Editor and Standalone build. Also tested Wind Zone, Terrain Tree painting, interaction with Spot, Point, Directional lights and shadows - no issues found.
This reverts commit 39dfb3c.
* Squashed commits for 19.4's ST8 support * Add wind enable/disable toggle to HD ST8 shader. * Fixup URP SpeedTree8 shader. Hookup GI for both ST8 shaders. * Update HD ST8 test scene to test various wind qualities and wind enable toggle. * Fix double-sided setting on billboard materials. * Remove redundant keyword enable per review. * Remove unused keyword from HD ST8 * Updated changelogs for SpeedTree8 addition. * Add ST8 shadergraphs to HD and Universal, including supporting subshadergraphs in ShaderGraph and MaterialUpgrader in core. Add a test to HDRP for speedtree8. * Fixup SpeedTree8 test rename * Add reference images for linuxeditor/vulkan * Fixup LOD0 material misassignment * Clean up renamed HDLitGUI * Update reference images from first 10.x.x yamato runs. (Darker shadows) * Merge hue variation, crossfade, and seam blending into SpeedTree8ColorAlpha subgraph. Fix Base Map naming in URP ST8 shadergraph. Fix wait framerate in HD ST8 test. * Modify hue variation subgraph to match handwritten ST8 shader * Add lerp hue variation behavior for backwards compatibility. Only expose this property in universal ST8. * Format files that need it * Update reference images after fixing frame wait time for HD ST8 test * Hook up GI and subsurface scattering in handwritten SpeedTree8 Universal shader * Update test materials to use a diffusion profile. Set thickness to 100 when subsurface is disabled. * Grab default foliage diffusion profile when importing or upgrading an HD ST8 shader * Remove subsurface enable from ST8 shader. Update ST8 test scene to use foliage diffusion profile. * Remove wait time from HD ST8 test * Modulate subsurface with _SubsurfaceIndirect property * Fix SpeedTree8 subsurface per feedback * Update reference images for HD ST8 test after changing to foliage diffusion profile and disabling wind * Update SpeedTree8 shader to sample shadowmap when attenuating direct subsurface. Update ST8 shadergraph to match subsurface calculations. * Update shadergraph changelog after refactoring subshadergraphs for ST8. Move LODCrossfade.hlsl out of Nature-specific folder. * Fix hue variation randomization to work with HD's camera relative rendering * Change default Subsurface color to black from white * Fix URP shadergraph default subsurface color and texture * Update HDRP reference images once more- trunks are a slightly different color? * Update failing tests after handwritten ST8 shader was updated. * Set alpha to 0 on billboard backfaces * Update HD ST8 shadergraph after billboard subshadergraph was modified * Normalize view direction when calculating subsurface * Convert floats to sliders. Add a Diffusion profile property so that it can be grouped with subsurface properties. * Incorporate docs feedback * Fix HD ST8 test material diffusion profiles after diffusion profile property change * Docs feedback on changelogs * Clean up redundant GGX code in SpeedTree8Passes. Add comment to LODCrossfade explaining its redundancy with existing Common.hlsl code. * Renamed LODCrossfade to make clear its relation to the core LODDitheringTransition function. * Docs changes. * Test universal iphone failure * Docs changes * Only generate camera motion vectors when importing ST8 asset to SRP. * Clean up ST8 shader warnings where possible * Update HD ST8 ref images after adding an abs() to subsurface calculation * Update HDRP Metal reference screenshots 1601_TerrainLit * Revert "Update HDRP Metal reference screenshots 1601_TerrainLit" This reverts commit 39dfb3c. Co-authored-by: Tianliang Ning <[email protected]> Co-authored-by: Sebastien Lagarde <[email protected]>
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.
No changes from the 7.x.x version of this PR, aside from what was necessary to merge with 10.x.x version of HDRP.
21.1 PR: #4068
PR to master: #3911
Testing status
(Copied from 7.x.x)
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
@adrien-de-tocqueville since you signed off on the 7.x.x version of this, and the 10.x.x is unchanged.
@LandonTownsendUnity for a QA pass on HDRP (should behave the same as 7.x.x).
Shader graph: Please confirm placement of new subshadergraphs I've added to the shadergraph package, including changelog notes. I also added a LODCrossfade hlsl file. This is not ST8-specific; is there a better way of adding this?