webgpu / webgpufundamentals

https://webgpufundamentals.org
BSD 3-Clause "New" or "Revised" License
624 stars 88 forks source link

trouble with write_texture data #91

Closed ford442 closed 7 months ago

ford442 commented 7 months ago

I have been trying to work around the lack of HTMLVideoElement interaction by getting video frame data into a canvas element and then into C++ webgpu.h write_texture via emscripten FS files. Using regular webgl getImageData commands gives me an odd shaped image over in C++. Maybe i don't know the exact request of bytesPerBlockRow or blockRowsPerImage purpose or equation? I get my frames all chopped up into consecutively smaller chunks as if the data sizes don't line up.

Anyone want to clarify? ty...