Skip to content

[Bug] No support for video textures in 9.1 #2304

@felixpalmer

Description

@felixpalmer

Reported as a bug, but added a header with details on possible paths for fix this

Module and/or Feature

Immutable Textures - The support for video textures was lost during the big luma.gl texture refactor. A key part of this refactor was to make the basic @luma.gl/core Texture class immutable. There were strong reasons for this.

  • Resource immutability aligns with WebGPU,
  • It avoids having to add lots of logic in the core, webgpu and webgl libraries.

AsyncTexture - To still allow for valuable features such as texture resize, async loading of textures etc, a new class AsyncTexture was created in @luma.gl/engine (it creates and destroys immutable textures under the hood when resizing etc). It may be possible to add back the special handling that was removed from the webgl texture implementation to the AsyncTexture class

  • ExternalTexture - However, a complication is that video textures are handled very differently in WebGPU, where special transient/throw away class called GPUExternalTexture must be created each frame.

It is not yet clear how a unified implementation would look.


Bug Description

When trying to use a video element for a texture, deck.gl is failing. The update() method has been removed and the deprecation notice references ExternalTexture, however this appears to unimplemented also

Expected Behavior

No response

Steps to Reproduce

https://felixpalmer.github.io/deck.gl/examples/first-person-view

Environment

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions