Closed gkjohnson closed 2 months ago
nullFeatureId
represents a null / non existant valueTEXCOORD_#
but three converts this to uv#
.Reading data from a canvas takes around 1-2ms to read but we don't have to deal with disposing texture data from the canvas and it's sync. WebGL texture read would probably also be similarly slow unless async reads are used.
https://jsfiddle.net/ycn46tfq/2/
Multiple textures can be sampled at once by writing them next to each other to cut down on read time
We can't use canvas readback due to the inability to disable alpha multiplication (link) which results in losing all data on read. A better solution may be to render and readback from a local webgl instance and immediately discard the texture. Then all image bitmaps can be disposed on tiles renderer disposal.
See gltf variants approach for a similar type of case.
Depending on potential performace impliciations it would be possible to just upload the single pixel that needs to be written. See latest WebGL2 update from here.
Updating the WebGLRenderer.copyTextureToTexture
to behave more similarly to the copyTextureToTexture3D
function such that it takes a bounding box to copy in. Must perform benchmarks to demonstrate performance improvements.
Specification
https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features
Test files
https://github.com/CesiumGS/3d-tiles-samples/tree/main/glTF/EXT_mesh_features
TODO