Skip to content

Add XRView to XRDepthInformation #50

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

Merged
merged 5 commits into from
Apr 4, 2025
Merged

Conversation

cabanier
Copy link
Member

@cabanier cabanier commented Sep 23, 2024

/tpac


Preview | Diff

@cabanier cabanier requested a review from alcooper91 September 23, 2024 16:32
@probot-label probot-label bot added the TPAC label Sep 23, 2024
@alcooper91
Copy link
Contributor

Spoke offline yesterday and proposed some way to make this not a breaking change, suggested adding a new dictionary member that can be default false and true to indicate that the page is willing to handle this new information.

@Yonet Yonet removed the TPAC label Sep 24, 2024
@cabanier
Copy link
Member Author

This was discussed at TPAC and the consensus was that we should return an XRView instead with the information of the depth texture.

@cabanier cabanier changed the title Add projectionMatrix to XRDepthInformation Add XRView to XRDepthInformation Sep 30, 2024
@cabanier
Copy link
Member Author

Addresses #45

@alcooper91
Copy link
Contributor

Overall this approach seems fine; except that I thought we had also discussed a way for the site to opt-in/acknowledge "Yes, I'm willing to handle this optional view" (Which may have been either a method to populate that view or to otherwise acquire it?)

@cabanier
Copy link
Member Author

Overall this approach seems fine; except that I thought we had also discussed a way for the site to opt-in/acknowledge "Yes, I'm willing to handle this optional view" (Which may have been either a method to populate that view or to otherwise acquire it?)

Yes, I didn't add that yet because the power outage stopped our meeting mid-way
I agree that this needs to be an opt-in

@cabanier
Copy link
Member Author

cabanier commented Oct 1, 2024

@alcooper91 do you want to address the optionality first before this is merged?

@alcooper91
Copy link
Contributor

Yeah, I'd prefer to land that all at once so we don't have a weird in-between state of the spec.

I won't be able to attend the next meeting, but I'm happy to go along with whatever folks decide if you think we should continue the discussion at that?

@cabanier
Copy link
Member Author

cabanier commented Oct 1, 2024

/agenda discuss adding an optional feature that accomodates slower depth refresh rate

@probot-label probot-label bot added the agenda label Oct 1, 2024
Copy link
Contributor

@alcooper91 alcooper91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matchDepthView seems fine, but I think depthNear and depthFar address a different issue, so I'd prefer if we could split them to their own PR (though I also thought we had discussed that maybe we didn't need them, but it somewhat depended on some math that we should potentially include in the spec if we do?).

I'm not sure that the isValid change is necessary, given that we can also simply return null, per the existing spec text? I worry that sites will not check this and will simply expect that if they receive an XRDepthInformation that it is valid.

};
</script>

The {{XRDepthStateInit/usagePreference}} is an ordered sequence of {{XRDepthUsage}}s, used to describe the desired depth sensing usage for the session.

The {{XRDepthStateInit/dataFormatPreference}} is an ordered sequence of {{XRDepthDataFormat}}s, used to describe the desired depth sensing data format for the session.

The {{XRDepthStateInit/matchDepthView}} requests that {{XRDepthInformation/view}} of the depth information must be in sync with the {{XRView}}. If this is <code>true</code>, the {{XRSystem}} SHOULD return depth information that reflects the current frame. If this is <code>false</code>, the {{XRSystem}} MAY return depth information that was captured at an earlier point in time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to allow an earlier point in time, we should probably add a time element to the data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least on our platform, we don't return the time that the depth was captured. I'm also unsure what it could be used for.

index.bs Outdated
};
</script>

The {{XRDepthStateInit/usagePreference}} is an ordered sequence of {{XRDepthUsage}}s, used to describe the desired depth sensing usage for the session.

The {{XRDepthStateInit/dataFormatPreference}} is an ordered sequence of {{XRDepthDataFormat}}s, used to describe the desired depth sensing data format for the session.

The {{XRDepthStateInit/matchDepthView}} requests that {{XRDepthInformation/view}} of the depth information must be in sync with the {{XRView}}. If this is <code>true</code>, the {{XRSystem}} SHOULD return depth information that reflects the current frame. If this is <code>false</code>, the {{XRSystem}} MAY return depth information that was captured at an earlier point in time.

NOTE: If {{XRDepthStateInit/matchDepthView}} is <code>false</code>, the author should do the reprojection using the [=XRDepthInformation/view=] from {{XRDepthInformation}}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to provide any sample math for this? (I have some in Chromium C++)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add that as an informative note but I prefer if we updated the sample.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per meeting this week, let's start with the sample.

@Yonet Yonet removed the agenda label Feb 4, 2025
@alcooper91
Copy link
Contributor

@cabanier what's the status on this?

@cabanier
Copy link
Member Author

@cabanier what's the status on this?

I'd still like to expose this through the depth API. Reprojection of the depth pixels is a lot more efficient if it is done by the developer.

@alcooper91
Copy link
Contributor

Oh I agree! I was just asking if there were any other blockers beyond the cleanups we had most recently discussed

@cabanier
Copy link
Member Author

Oh I agree! I was just asking if there were any other blockers beyond the cleanups we had most recently discussed

I don't think so; I've just been to busy to spend more time on it

@alcooper91 alcooper91 mentioned this pull request Mar 17, 2025
@cabanier cabanier force-pushed the viewmatrix branch 2 times, most recently from 708607c to a4969a7 Compare April 4, 2025 18:47
@alcooper91
Copy link
Contributor

LGTM, I think the only other things we may want to add before we merge are potentially exposing the time and the other little bit of text that may need to be updated?

@alcooper91 alcooper91 self-requested a review April 4, 2025 20:15
Copy link
Contributor

@alcooper91 alcooper91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as-is will re-review if you like after additional changes.

@cabanier cabanier merged commit 3cf417f into immersive-web:main Apr 4, 2025
2 checks passed
@cabanier cabanier deleted the viewmatrix branch April 4, 2025 20:42
github-actions bot added a commit that referenced this pull request Apr 4, 2025
SHA: 3cf417f
Reason: push, by cabanier

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants