Expanded Msaa documentation. (#3693)
- Added default value. - Links to the explanation of Msaa on wikipedia. - Added a short example to show how to use the struct on an app. Fixes #3167.
This commit is contained in:
parent
758fc5af67
commit
3fcdc5a492
@ -40,9 +40,22 @@ impl Plugin for ViewPlugin {
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
/// Configuration resource for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing).
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// # use bevy_app::prelude::App;
|
||||
/// # use bevy_render::prelude::Msaa;
|
||||
/// App::new()
|
||||
/// .insert_resource(Msaa { samples: 4 })
|
||||
/// .run();
|
||||
/// ```
|
||||
pub struct Msaa {
|
||||
/// The number of samples to run for Multi-Sample Anti-Aliasing. Higher numbers result in
|
||||
/// smoother edges. Note that WGPU currently only supports 1 or 4 samples.
|
||||
/// smoother edges.
|
||||
/// Defaults to 4.
|
||||
///
|
||||
/// Note that WGPU currently only supports 1 or 4 samples.
|
||||
/// Ultimately we plan on supporting whatever is natively supported on a given device.
|
||||
/// Check out this issue for more info: <https://github.com/gfx-rs/wgpu/issues/1832>
|
||||
/// It defaults to 1 in wasm - <https://github.com/gfx-rs/wgpu/issues/2149>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user