@@ -176,7 +176,6 @@ pub struct ExtractedUiNode {
176176 pub clip : Option < Rect > ,
177177 pub flip_x : bool ,
178178 pub flip_y : bool ,
179- pub scale_factor : f32 ,
180179}
181180
182181#[ derive( Resource , Default ) ]
@@ -188,7 +187,6 @@ pub fn extract_uinodes(
188187 mut extracted_uinodes : ResMut < ExtractedUiNodes > ,
189188 images : Extract < Res < Assets < Image > > > ,
190189 ui_stack : Extract < Res < UiStack > > ,
191- windows : Extract < Res < Windows > > ,
192190 uinode_query : Extract <
193191 Query < (
194192 & Node ,
@@ -200,7 +198,6 @@ pub fn extract_uinodes(
200198 ) > ,
201199 > ,
202200) {
203- let scale_factor = windows. scale_factor ( WindowId :: primary ( ) ) as f32 ;
204201 extracted_uinodes. uinodes . clear ( ) ;
205202 for ( stack_index, entity) in ui_stack. uinodes . iter ( ) . enumerate ( ) {
206203 if let Ok ( ( uinode, transform, color, maybe_image, visibility, clip) ) =
@@ -236,7 +233,6 @@ pub fn extract_uinodes(
236233 clip : clip. map ( |clip| clip. clip ) ,
237234 flip_x,
238235 flip_y,
239- scale_factor,
240236 } ) ;
241237 }
242238 }
@@ -364,7 +360,6 @@ pub fn extract_text_uinodes(
364360 clip : clip. map ( |clip| clip. clip ) ,
365361 flip_x : false ,
366362 flip_y : false ,
367- scale_factor,
368363 } ) ;
369364 }
370365 }
@@ -500,20 +495,20 @@ pub fn prepare_uinodes(
500495 let atlas_extent = extracted_uinode. atlas_size . unwrap_or ( uinode_rect. max ) ;
501496 let mut uvs = [
502497 Vec2 :: new (
503- uinode_rect. min . x + positions_diff[ 0 ] . x * extracted_uinode . scale_factor ,
504- uinode_rect. min . y + positions_diff[ 0 ] . y * extracted_uinode . scale_factor ,
498+ uinode_rect. min . x + positions_diff[ 0 ] . x ,
499+ uinode_rect. min . y + positions_diff[ 0 ] . y ,
505500 ) ,
506501 Vec2 :: new (
507- uinode_rect. max . x + positions_diff[ 1 ] . x * extracted_uinode . scale_factor ,
508- uinode_rect. min . y + positions_diff[ 1 ] . y * extracted_uinode . scale_factor ,
502+ uinode_rect. max . x + positions_diff[ 1 ] . x ,
503+ uinode_rect. min . y + positions_diff[ 1 ] . y ,
509504 ) ,
510505 Vec2 :: new (
511- uinode_rect. max . x + positions_diff[ 2 ] . x * extracted_uinode . scale_factor ,
512- uinode_rect. max . y + positions_diff[ 2 ] . y * extracted_uinode . scale_factor ,
506+ uinode_rect. max . x + positions_diff[ 2 ] . x ,
507+ uinode_rect. max . y + positions_diff[ 2 ] . y ,
513508 ) ,
514509 Vec2 :: new (
515- uinode_rect. min . x + positions_diff[ 3 ] . x * extracted_uinode . scale_factor ,
516- uinode_rect. max . y + positions_diff[ 3 ] . y * extracted_uinode . scale_factor ,
510+ uinode_rect. min . x + positions_diff[ 3 ] . x ,
511+ uinode_rect. max . y + positions_diff[ 3 ] . y ,
517512 ) ,
518513 ]
519514 . map ( |pos| pos / atlas_extent) ;
0 commit comments