-
Notifications
You must be signed in to change notification settings - Fork 842
[Fix] Motion Vectors: Enable for XR #4707
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
base: master
Are you sure you want to change the base?
Conversation
- Replaced cmd.Blit with cmd.DrawMesh. cmd.Blit is not compatible with XR. - Added clear to motion vector pass.
… the depth+msaa issue
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.
There's also changelog missing.
...niversalGraphicsTest_Foundation/Assets/Scenes/210_Motion_Vectors/CaptureMotionVectorsPass.cs
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,65 @@ | |||
Shader "MotionVecDebug" |
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.
Is this used for testing only? Maybe it should be under the https://github.com/Unity-Technologies/Graphics/tree/master/com.unity.testing.urp
package.
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.
Minor naming suggestion
Shader "MotionVecDebug" | |
Shader "MotionVectorsDebug" |
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.
There doesn't seem to be any other test related shaders in that package, why should this one specifically be moved? Other tests have shaders kept in the foundation project.
- FilteredScene: {fileID: 0} | ||
FilteredScenes: | ||
- {fileID: 102900000, guid: 26800f4b3c38849428d29e93038a6084, type: 3} | ||
ColorSpace: -1 | ||
BuildPlatform: -2 | ||
GraphicsDevice: 21 | ||
XrSdk: | ||
StereoModes: 0 | ||
Reason: Needs fix for MSAA+depth | ||
- FilteredScene: {fileID: 0} | ||
FilteredScenes: | ||
- {fileID: 102900000, guid: 26800f4b3c38849428d29e93038a6084, type: 3} | ||
ColorSpace: -1 | ||
BuildPlatform: -2 | ||
GraphicsDevice: 11 | ||
XrSdk: | ||
StereoModes: 0 | ||
Reason: Needs fix for MSAA+depth |
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.
What are the exceptions being added here for which platforms?
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.
Excluding new camera motion vector test since there is a bug on vulkan with msaa and depth
com.unity.render-pipelines.universal/Shaders/CameraMotionVectors.shader
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.universal/Shaders/ObjectMotionVectors.shader
Outdated
Show resolved
Hide resolved
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 to me.
com.unity.render-pipelines.universal/Shaders/CameraMotionVectors.shader
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.universal/Shaders/CameraMotionVectors.shader
Outdated
Show resolved
Hide resolved
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 looked good from an XR perspective. I tested Quest using Vulkan and Mock HMD using DX11 for multipass, multiview and instancing and motion vectors all looked proper in both eyes in all cases.
Is this PR still active and is it being worked on to merge? |
Purpose of this PR
Enable Motion Vectors for XR and fix some issues with multi pass and camera motion vectors.
When enabling test for xr I noticed that view matrix did not update properly for multi pass, fixed this by uploading view as well.
Testing status
Enabled Object Motion Vector test for XR.

Added test for Camera Motion Vectors (also enabled for XR).
Renamed test scenes to not have a number so close to SSAO scenes.
Camera Motion Vector tests are disabled on GLES3 due to issues with depth and msaa, but running it locally they look correct:
Comments to reviewers
Notes for the reviewers you have assigned.