File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,24 @@ fn setup(
95
95
} ) ;
96
96
97
97
// Main camera, first to render
98
- commands. spawn ( Camera3dBundle {
99
- camera_3d : Camera3d {
100
- clear_color : ClearColorConfig :: Custom ( Color :: WHITE ) ,
101
- ..default ( )
102
- } ,
103
- camera : Camera {
104
- target : RenderTarget :: Image ( image_handle. clone ( ) ) ,
98
+ commands. spawn ( (
99
+ Camera3dBundle {
100
+ camera_3d : Camera3d {
101
+ clear_color : ClearColorConfig :: Custom ( Color :: WHITE ) ,
102
+ ..default ( )
103
+ } ,
104
+ camera : Camera {
105
+ target : RenderTarget :: Image ( image_handle. clone ( ) ) ,
106
+ ..default ( )
107
+ } ,
108
+ transform : Transform :: from_translation ( Vec3 :: new ( 0.0 , 0.0 , 15.0 ) )
109
+ . looking_at ( Vec3 :: default ( ) , Vec3 :: Y ) ,
105
110
..default ( )
106
111
} ,
107
- transform : Transform :: from_translation ( Vec3 :: new ( 0.0 , 0.0 , 15.0 ) )
108
- . looking_at ( Vec3 :: default ( ) , Vec3 :: Y ) ,
109
- .. default ( )
110
- } ) ;
112
+ // Disable UI rendering for the first pass camera. This prevents double rendering of UI at
113
+ // the cost of rendering the UI without any post processing effects.
114
+ UiCameraConfig { show_ui : false } ,
115
+ ) ) ;
111
116
112
117
// This specifies the layer used for the post processing camera, which will be attached to the post processing camera and 2d quad.
113
118
let post_processing_pass_layer = RenderLayers :: layer ( ( RenderLayers :: TOTAL_LAYERS - 1 ) as u8 ) ;
You can’t perform that action at this time.
0 commit comments