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 a way to query the transform matrix of a surface texture from the driver #8489

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ajmalk
Copy link

@ajmalk ajmalk commented Mar 5, 2025

From: https://developer.android.com/reference/android/graphics/SurfaceTexture

When sampling from the texture one should first transform the texture coordinates using the matrix queried via getTransformMatrix(float[]). The transform matrix may change each time updateTexImage() is called, so it should be re-queried each time the texture image is updated.

Exposing the matrix to the driver is the first step to being able to apply it to the uniform in the shader.

Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

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

Thanks looks pretty good. I just would like to return by value instead of output parameter

@pixelflinger pixelflinger requested review from poweifeng and z3moon and removed request for poweifeng March 5, 2025 07:02
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Mar 5, 2025
@ajmalk
Copy link
Author

ajmalk commented Mar 5, 2025

done

@ajmalk ajmalk requested a review from pixelflinger March 5, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants