mirror of
https://github.com/bevyengine/bevy
synced 2024-11-23 21:23:05 +00:00
c0aa5170bc
# Objective - Fixes #12411 - Add an example demonstrating the usage of asset meta files. ## Solution - Add a new example displaying a basic scene of three pixelated images - Apply a .meta file to one of the assets setting Nearest filtering - Use AssetServer::load_with_settings on the last one as another way to achieve the same effect - The result is one blurry image and two crisp images demonstrating a common scenario in which changing settings are useful.
25 lines
No EOL
818 B
Text
25 lines
No EOL
818 B
Text
(
|
|
meta_format_version: "1.0",
|
|
asset: Load(
|
|
loader: "bevy_render::texture::image_loader::ImageLoader",
|
|
settings: (
|
|
format: FromExtension,
|
|
is_srgb: true,
|
|
sampler: Descriptor (ImageSamplerDescriptor(
|
|
address_mode_u: ClampToEdge,
|
|
address_mode_v: ClampToEdge,
|
|
address_mode_w: ClampToEdge,
|
|
mag_filter: Nearest,
|
|
min_filter: Nearest,
|
|
mipmap_filter: Nearest,
|
|
lod_min_clamp: 0,
|
|
lod_max_clamp: 32.0,
|
|
compare: None,
|
|
anisotropy_clamp: 1,
|
|
border_color: None,
|
|
label: None,
|
|
)),
|
|
asset_usage: RenderAssetUsages("RENDER_WORLD | MAIN_WORLD"),
|
|
),
|
|
),
|
|
) |