@@ -6,7 +6,9 @@ use bevy_reflect::prelude::*;
6
6
use derive_more:: derive:: From ;
7
7
use serde:: { Deserialize , Serialize } ;
8
8
9
- /// For a camera, specifies the color used to clear the viewport before rendering.
9
+ /// For a camera, specifies the color used to clear the viewport
10
+ /// [before rendering](crate::camera::Camera::clear_color)
11
+ /// or when [writing to the final render target texture](crate::camera::Camera::output_mode).
10
12
#[ derive( Reflect , Serialize , Deserialize , Copy , Clone , Debug , Default , From ) ]
11
13
#[ reflect( Serialize , Deserialize , Default , Clone ) ]
12
14
pub enum ClearColorConfig {
@@ -21,10 +23,15 @@ pub enum ClearColorConfig {
21
23
None ,
22
24
}
23
25
24
- /// A [`Resource`] that stores the color that is used to clear the screen between frames.
26
+ /// A [`Resource`] that stores the default color that cameras use to clear the screen between frames.
25
27
///
26
28
/// This color appears as the "background" color for simple apps,
27
29
/// when there are portions of the screen with nothing rendered.
30
+ ///
31
+ /// Individual cameras may use [`Camera.clear_color`] to specify a different
32
+ /// clear color or opt out of clearing their viewport.
33
+ ///
34
+ /// [`Camera.clear_color`]: crate::camera::Camera::clear_color
28
35
#[ derive( Resource , Clone , Debug , Deref , DerefMut , ExtractResource , Reflect ) ]
29
36
#[ reflect( Resource , Default , Debug , Clone ) ]
30
37
pub struct ClearColor ( pub Color ) ;
0 commit comments