pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
237 stars 16 forks source link

feat: add ktx and basis loaders for gltf support #290

Closed dmnsgn closed 4 months ago

dmnsgn commented 3 years ago
dmnsgn commented 3 years ago

https://github.com/pex-gl/pex-renderer/pull/290/files?file-filters%5B%5D=.bin&file-filters%5B%5D=.glb&file-filters%5B%5D=.gltf&file-filters%5B%5D=.js&file-filters%5B%5D=.ktx2&file-filters%5B%5D=.wasm#diff-87811566cf44cfa2530f48a396c80080b6a5ea307a282e8dd1e8c55172f40299R202-R208

I should check for array of TypedArray instead of just .compressed (basis loader can return uncompressed fallback mipmaps).

vorg commented 3 years ago

We have an issue with getPexMaterialTexture crashing when trying to resize NPOT of image as texture is having mipmaps but the source data is compressed blob not html image source. Disabling check prevents the crash but leads to GL errors as now we are trying to upload NPOT mipmaps which webgl1 doesn't support.

dmnsgn commented 4 months ago

Closing as included in pex-loaders + pex-renderer gltf (issue about leftovers here if needed)