Skip to content

Conversation

@grind086
Copy link
Contributor

Objective

If you want to use a TilemapChunk (or more generally use a texture2DArray in a shader), you have to implement a mechanism that waits for your texture to load, then calls Image::reinterpret_stacked_2d_as_array.

Solution

Have the loader do it instead.

Testing

  • Ran the updated examples

Showcase

let array_texture = asset_server.load_with_settings(
    "textures/array_texture.png",
    |settings: &mut ImageLoaderSettings| {
        settings.array_layout = Some(ImageArrayLayout::RowCount(4));
    },
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant