-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
WebGPURenderer: Added VideoTexture support #25530
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
Conversation
|
|
||
| } else { | ||
|
|
||
| console.error( 'WebGPURenderer: THREE.VideoTexture does not support vertex shader.' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it support compute shader?
|
|
||
| if ( this.defaultVideoTexture === null ) { | ||
|
|
||
| const video = document.getElementById( 'video' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do something like this here:
const video = typeof document !== 'undefined' ? document.createElement( 'video' ) : null;There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... My first attempt was just put THREE.VideoTexture() but it crashes here:
three.js/src/textures/VideoTexture.js
Line 26 in 2745552
| if ( 'requestVideoFrameCallback' in video ) { |
and maybe should crashes using device.importExternalTexture() too without <video>.
Description
Live:
https://raw.githack.com/sunag/three.js/webgpu-video-texture/examples/webgpu_materials_video.html