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

Fix tonemap and UV coordinates #33

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Fix tonemap and UV coordinates #33

merged 1 commit into from
Jun 19, 2024

Conversation

jocmp
Copy link
Collaborator

@jocmp jocmp commented Jun 19, 2024

Fixes the washed out AR video colors by calling "inverseTonemapSRGB" on the video texture color. This ensures that the tonemap is correctly set when the video is recognized.

Before After

Additionally this commit removes the extra call to rotate the final image texture. This is due to how Filament, the 3D library beneath ARCore, handles UV (XY) coordinates by default

When set to true (default value), the Y coordinate of
UV attributes will be flipped when read by this
material's vertex shader.

Relates to

Fixes the washed out AR video colors by calling
"inverseTonemapSRGB" on the video texture color. This
ensures that the tonemap is correctly set when the
video is recognized.

Additionally this commit removes the extra call to rotate
the final image texture. This is due to how Filament, the
3D library beneath ARCore, handles UV (XY) coordinates by
default

> When set to true (default value), the Y coordinate of
> UV attributes will be flipped when read by this
> material's vertex shader.

Relates to

- google/filament#3067
- SceneView/sceneform-android#437
Comment on lines +82 to +88
config.setFocusMode(Config.FocusMode.AUTO)
config.planeFindingMode = Config.PlaneFindingMode.DISABLED
session?.apply {
pause()
resume()
pause()
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes bad autofocus issue

@jocmp jocmp merged commit 707673b into main Jun 19, 2024
1 check passed
@jocmp jocmp deleted the jc/fix-tone-map branch June 19, 2024 03:04
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.

None yet

1 participant