@@ -295,7 +295,7 @@ fn prepare_screenshots(
295295 prepared. insert ( * entity, state) ;
296296 view_target_attachments. insert (
297297 target. clone ( ) ,
298- OutputColorAttachment :: new ( texture_view. clone ( ) ) ,
298+ OutputColorAttachment :: new ( texture_view. clone ( ) , format . add_srgb_suffix ( ) ) ,
299299 ) ;
300300 }
301301 NormalizedRenderTarget :: Image ( image) => {
@@ -315,7 +315,7 @@ fn prepare_screenshots(
315315 prepared. insert ( * entity, state) ;
316316 view_target_attachments. insert (
317317 target. clone ( ) ,
318- OutputColorAttachment :: new ( texture_view. clone ( ) ) ,
318+ OutputColorAttachment :: new ( texture_view. clone ( ) , format . add_srgb_suffix ( ) ) ,
319319 ) ;
320320 }
321321 NormalizedRenderTarget :: TextureView ( texture_view) => {
@@ -326,7 +326,7 @@ fn prepare_screenshots(
326326 ) ;
327327 continue ;
328328 } ;
329- let format = manual_texture_view. texture_view . texture ( ) . format ( ) ;
329+ let format = manual_texture_view. format ;
330330 let size = manual_texture_view. size . to_extents ( ) ;
331331 let ( texture_view, state) = prepare_screenshot_state (
332332 size,
@@ -339,7 +339,7 @@ fn prepare_screenshots(
339339 prepared. insert ( * entity, state) ;
340340 view_target_attachments. insert (
341341 target. clone ( ) ,
342- OutputColorAttachment :: new ( texture_view. clone ( ) ) ,
342+ OutputColorAttachment :: new ( texture_view. clone ( ) , format . add_srgb_suffix ( ) ) ,
343343 ) ;
344344 }
345345 NormalizedRenderTarget :: None { .. } => {
@@ -550,7 +550,7 @@ pub(crate) fn submit_screenshot_commands(world: &World, encoder: &mut CommandEnc
550550 } ;
551551 let width = texture_view. size . x ;
552552 let height = texture_view. size . y ;
553- let texture_format = texture_view. texture_view . texture ( ) . format ( ) ;
553+ let texture_format = texture_view. format ;
554554 let texture_view = texture_view. texture_view . deref ( ) ;
555555 render_screenshot (
556556 encoder,
0 commit comments