-
Notifications
You must be signed in to change notification settings - Fork 792
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
Fix VT Feedback buffer #4868
Fix VT Feedback buffer #4868
Conversation
…ses where InitBuiltinData function is called or ZERO_INITIALIZE. Fix for ShaderGraph too.
It appears that you made a non-draft PR! |
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.
Welcome to the Unity SRP repo!
Please make sure to fill out the PR template as best you can to give reviewers as much information as possible.
If you have any questions (and you are a Unity employee) go to "#devs-renderpipe"
@sebastienlagarde Hello! What is the current process for backporting PRs? Will your team pick it up or should I do it myself? I need to backport all the way to 8.0.0 as this version is used by 2020.3 editor. I don't see a backport label for 8.0 though? |
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.
Good for the VT change of 0,0,0,0 to 1,1,1,1. Difficult for me to judge if the changes will catch all situations where the struct is initialized by hdrp.
Yup that was the majority of the effort to find out all the places. It's really hard to centralize as there are different situations this struct is used. And I guess not really future proof. Having a graphics tests that checks out what's being written to the VT feedback buffer sounds unviable either as you'll basically need to have all shaders now and future in the test. Just adding the initialization code probably is the best we can do now. Hopefully there is little chance in the future that a new handwritten shader will be added to HDRP, so that for the majority of the situations SG coverage is good enough. |
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 good!
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.
Nothing to add, looks okay for as far as I can tell ...
…ack-initialization # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md # com.unity.shadergraph/CHANGELOG.md
…ata struct plus correct vt feedback initializing. Guard the code under UNITY_VIRTUAL_TEXTURING define.
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. HDRP Shader Graph 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. |
* Improved a bit the area cookie behavior for higher smoothness values to reduce artifacts. #3578 * [SRP] Add Conditional field for shader code generation in Generate include command #4889 * Fix VT Feedback buffer #4868 * [HDRP][Path Tracing] Backport of sky+recorder fix #5001 * [HDRP] Fix distortion when resizing the graphics compositor window in builds #5062 * Add compatibility with Unity 2020.3 for compositor resize callback * Small cleanup Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Yao Xiaoling <yao@unity3d.com> Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
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.md
file.[ ] Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR. If you do add documentation, make sure to add the relevant Graphics Docs team member as a reviewer of the PR. If you are not sure which person to add, see the Docs team contacts sheet.No documentation change is necessary.[ ] Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test.Adding a graphics test for checking the VT feedback buffer might be possible, but is difficult to do. For the scope of this PR it doesn't feel necessary.Purpose of this PR
Fix VT feedback buffer values by correctly initialize BuiltinData.vtPackedFeedback to (1,1,1,1) for cases either InitBuiltinData function is called or ZERO_INITIALIZE. Fix for ShaderGraph too.
Previously the value is zero initialized which actually is a valid tile ID ({0,0,0} for tileset 0). Correcting it is important for the underlying VT code to correctly prioritize tile requests coming from manually managed procedural VT stacks.
Testing status
Manually tested with SG shaders and HDRP Lit shader, in HDRP Test project plus the Environment test project.