You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The obvious expectation would be that the texture would be the size of HTMLVideoElement.videoWidth/videoHeight.
However, texture-corner-case-videos.html does not catch this expectation.
In fact, the test was modified to pass the inverse of this, e.g. behavior where the texture might be smaller.
Also, texture-corner-case-videos seems to contain hidden errors for the texSubImage2D case. The logic is that the texture is created with HTMLVideoElement.videoWidth/videoHeight but then uploaded with texSubImage2D. The upload might be smaller than videoWidth, videoHeight, but this is not caught by the test.
So the ideal intention in #2464 was to let the browser upload video data unscaled 1:1. However, this is problematic as:
it is not specified how it works
tests about it have bugs
it is not possible to use it after it is specified, as the needed property (video data size) is not available in HTMLVideoElement. E.g. you can upload unscaled, but using texSubImage2D to update is impossible as we have no way of knowing what parameters pass as x,y,w,h.
Specify and test how texture upload should work with video elements.
https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.9
The obvious expectation would be that the texture would be the size of HTMLVideoElement.videoWidth/videoHeight.
However, texture-corner-case-videos.html does not catch this expectation.
In fact, the test was modified to pass the inverse of this, e.g. behavior where the texture might be smaller.
Also, texture-corner-case-videos seems to contain hidden errors for the texSubImage2D case. The logic is that the texture is created with HTMLVideoElement.videoWidth/videoHeight but then uploaded with texSubImage2D. The upload might be smaller than videoWidth, videoHeight, but this is not caught by the test.
So the ideal intention in #2464 was to let the browser upload video data unscaled 1:1. However, this is problematic as:
Here's a small tester to print rudimentary cases of how the current browsers work:
webgl-video-element-texture-size-tester.zip
WebCodecs expose the needed data, but that behavior is not specified in WebGL either.
The text was updated successfully, but these errors were encountered: