mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.86k stars 35.39k forks source link

Video Texture makes WebGL context lost on Ubuntu #29909

Open whatisor opened 6 days ago

whatisor commented 6 days ago

Description

Video texture example is black screen because of WebGL context lost on Ubuntu 22.04.

Initial analysis: When video is not ready( not first frame come), rendering is inited wrongly that makes WebGL crashes.

Issue is fixed on example if checking this before rendering.

if(video.currentTime > 0) composer.render();

Reproduction steps

  1. Open https://threejs.org/examples/?q=video#webgl_materials_video
  2. Click Play
  3. Nothing is show up. WebGL context lost on console log.

Code

https://threejs.org/examples/?q=video#webgl_materials_video

Live example

https://threejs.org/examples/?q=video#webgl_materials_video

Screenshots

image

Version

r170

Device

Desktop

Browser

Chrome

OS

Linux

Mugen87 commented 4 days ago

Do you experience a context lost with all examples using a video texture? How about this one:

https://threejs.org/examples/webgl_video_panorama_equirectangular

Besides, do you see any differences when using Firefox on the affected device?

Do you mind sharing a chrome://gpu/ report in this issue?

whatisor commented 4 days ago

I think it is related hardware, but panorama running well without issue. image

Mugen87 commented 4 days ago

Can you try to remove all post processing of webgl_materials_video and check if it works on your machine? Maybe the example is too demanding.

BTW: When you are getting asked to share a chrome://gpu/ report, the idea is not to make a screenshot but click the button "Download Report to File" and then share the resulting text file.

whatisor commented 1 day ago

Some more information:

Mugen87 commented 1 day ago

Do you see the same issues in Firefox?