NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
449 stars 53 forks source link

[Question] Loading assets with custom settings #215

Open Tam opened 1 month ago

Tam commented 1 month ago

I'm loading in a repeating texture and have to load it with a custom ImageSamplerDescriptor to set the UV address mode.

fn(&mut ImageLoaderSettings) = move |s: &mut ImageLoaderSettings| {
    s.sampler = ImageSampler::Descriptor(ImageSamplerDescriptor {
        address_mode_u: ImageAddressMode::Repeat,
        address_mode_v: ImageAddressMode::Repeat,
        ..default()
    });
};

Is there a way to do this while loading the asset via asset loader?

NiklasEi commented 1 month ago

Not at the moment. You can only change the sampler to Linear or Nearest via derive macro attribute.