immersive-web / depth-sensing

Specification: https://immersive-web.github.io/depth-sensing/ Explainer: https://github.com/immersive-web/depth-sensing/blob/main/explainer.md
Other
52 stars 15 forks source link

Fix the spec - pixel data is actually row-major #18

Closed bialpio closed 3 years ago

bialpio commented 3 years ago

WebGL / OpenGL treat the data as row-major when uploading it to the textures (consecutive entries are assumed to belong to the same row, see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml - "first element corresponds to the lower left corner of the texture image", "subsequent elements progress left-to-right throughout the remaining texels in the lowest row of the texture image, and then in successively higher rows of the texture image").

Fix the spec to account for that - we were already doing the right thing in Chrome's implementation but this bit me when writing WPTs.


Preview | Diff

toji commented 3 years ago

Post merge LGTM. Yes, this is definitely the way it should be specced!