Skip to content

copy_texture_to_texture does not work correct in webGL2 with array textures. #3197

@StarArawn

Description

@StarArawn

Description
When using copy_texture_to_texture with the webGL2 backend and array textures I get invalid data displayed. It's hard to tell exactly what is going wrong since I can't really debug the code. I tried SpectorJS but it does not show individual textures.

Repro steps
Clone:
https://github.com/StarArawn/bevy_ecs_tilemap

Run(wasm/webGL2/array texture):

cargo build --target wasm32-unknown-unknown --example iso_diamond --release
wasm-server-runner .\target\wasm32-unknown-unknown\release\examples\iso_diamond.wasm

Run(wasm/webGL2/atlas):

cargo build --target wasm32-unknown-unknown --example iso_diamond --release --features atlas
wasm-server-runner .\target\wasm32-unknown-unknown\release\examples\iso_diamond.wasm

Run(desktop)

cargo run --example iso_diamond

Expected vs observed behavior
Compare with the desktop or atlas versions and you can see the issue.

Extra materials
None

Platform
Chrome/WebGL2

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: glesIssues with GLES or WebGLtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions