Skip to content
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

add test to display foveated areas #201

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cabanier
Copy link
Member

This adds a test that shows the areas and strength of the foveated areas in an XR scene

@cabanier cabanier requested a review from toji October 28, 2024 22:11
Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

Thanks! Great idea for a test page. I appreciate that it looks like it'll work regardless of how the underlying foveation is applied. A couple of comments that I'd appreciate being addressed prior to landing.

@@ -0,0 +1,553 @@
<!doctype html>
<!--
Copyright 2018 The Immersive Web Community Group
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Copyright 2018 The Immersive Web Community Group
Copyright 2024 The Immersive Web Community Group

}
}

function createScene(gl)
Copy link
Member

Choose a reason for hiding this comment

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

As this is a test page and not a "sample" I'm not too concerned about it, but this is pretty different from the structure of most of our pages. From the looks of the comments it seems like it's ported from some Meta sample code? If it's publicly accessible code it would be good to add a comment somewhere indicating what this code is based on with a URL where the original can be found.

for ( var i = 0; i < NUM_INSTANCES; i++ )
{
obj.CubePositions[i] = { x:0, y:0, z:0 };
// Using volatile keeps the compiler from optimizing away multiple calls to ovrScene_RandomFloat().
Copy link
Member

Choose a reason for hiding this comment

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

It would be worth doing a pass over the comments to make sure they still make sense in this context. volatile isn't a concept that your average JavaScript developer knows about (or wants to know about, for that matter...😁)

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.

2 participants