WebGPU example for zoom-in the assigned area of a video embedded in the webpage canvas #19
Unanswered
Kuo-TingKai
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
There are two ways to achieve it. Method 1: You can set the texture coordinates of the four vertices as part of the entire texture. you can change layout method of WebGPURender to compute Method 2: You can add scale matrix and translate matrix in vertex shader, for example: You can refer to rotateMatrix of WebGPURender to add and I recommend you use this one. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Dear maintainer,
Could you provide some example to realize this feature like below code snippet, with libmedia acceleration.
I saw some WebGPU render/shade and 2d canvas texture modules in libmedia but I don't know how to utilize them.
Thanks a lot!
index.html:
zoom.js:
Beta Was this translation helpful? Give feedback.
All reactions