Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
This commit is contained in:
Alice Cecile 2025-07-08 15:09:08 -04:00 committed by GitHub
parent 6a46e23880
commit 0cf8679161
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,13 +389,19 @@ pub struct StandardMaterial {
///
/// # Usage
///
/// ```rust
/// let normal_handle = asset_server.load_with_settings(
/// "textures/parallax_example/cube_normal.png",
/// // The normal map texture is in linear color space. Lighting won't look correct
/// // if `is_srgb` is `true`, which is the default.
/// |settings: &mut ImageLoaderSettings| settings.is_srgb = false,
/// );
/// ```
/// # use bevy_asset::AssetServer;
/// # use bevy_ecs::ecs::change_detection::Res;
/// # use bevy_image::ImageLoaderSettings;
/// #
/// fn load_normal_map(asset_server: Res<AssetServer>) {
/// let normal_handle = asset_server.load_with_settings(
/// "textures/parallax_example/cube_normal.png",
/// // The normal map texture is in linear color space. Lighting won't look correct
/// // if `is_srgb` is `true`, which is the default.
/// |settings: &mut ImageLoaderSettings| settings.is_srgb = false,
/// );
/// }
/// ```
#[texture(9)]
#[sampler(10)]