File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,23 @@ pub struct StandardMaterial {
386
386
///
387
387
/// [`Mesh::generate_tangents`]: bevy_render::mesh::Mesh::generate_tangents
388
388
/// [`Mesh::with_generated_tangents`]: bevy_render::mesh::Mesh::with_generated_tangents
389
+ ///
390
+ /// # Usage
391
+ ///
392
+ /// ```
393
+ /// # use bevy_asset::{AssetServer, Handle};
394
+ /// # use bevy_ecs::change_detection::Res;
395
+ /// # use bevy_image::{Image, ImageLoaderSettings};
396
+ /// #
397
+ /// fn load_normal_map(asset_server: Res<AssetServer>) {
398
+ /// let normal_handle: Handle<Image> = asset_server.load_with_settings(
399
+ /// "textures/parallax_example/cube_normal.png",
400
+ /// // The normal map texture is in linear color space. Lighting won't look correct
401
+ /// // if `is_srgb` is `true`, which is the default.
402
+ /// |settings: &mut ImageLoaderSettings| settings.is_srgb = false,
403
+ /// );
404
+ /// }
405
+ /// ```
389
406
#[ texture( 9 ) ]
390
407
#[ sampler( 10 ) ]
391
408
#[ dependency]
You can’t perform that action at this time.
0 commit comments