RenderUiSystem::ExtractTextureSlice (#15332)
				
					
				
			# Objective Fixes #15330 ## Solution 1. Add an `ExtractTextureSlice` variant to `RenderUiSystem`. 2. Add `RenderUiSystem::ExtractTextureSlice` to the `ExtractSchedule` between `ExtractImages` and `ExtractBorders`. 3. Add `extract_ui_texture_slices` to the new `ExtractTextureSlice` system set. Which results in texture slice nodes being extracted before borders. No more z-fighting, borders will always be drawn on top of texture-sliced images.
This commit is contained in:
		
							parent
							
								
									661ab1ab41
								
							
						
					
					
						commit
						48f2bd410b
					
				| @ -70,6 +70,7 @@ pub const UI_SHADER_HANDLE: Handle<Shader> = Handle::weak_from_u128(130128470471 | |||||||
| pub enum RenderUiSystem { | pub enum RenderUiSystem { | ||||||
|     ExtractBackgrounds, |     ExtractBackgrounds, | ||||||
|     ExtractImages, |     ExtractImages, | ||||||
|  |     ExtractTextureSlice, | ||||||
|     ExtractBorders, |     ExtractBorders, | ||||||
|     ExtractText, |     ExtractText, | ||||||
| } | } | ||||||
| @ -95,6 +96,7 @@ pub fn build_ui_render(app: &mut App) { | |||||||
|             ( |             ( | ||||||
|                 RenderUiSystem::ExtractBackgrounds, |                 RenderUiSystem::ExtractBackgrounds, | ||||||
|                 RenderUiSystem::ExtractImages, |                 RenderUiSystem::ExtractImages, | ||||||
|  |                 RenderUiSystem::ExtractTextureSlice, | ||||||
|                 RenderUiSystem::ExtractBorders, |                 RenderUiSystem::ExtractBorders, | ||||||
|                 RenderUiSystem::ExtractText, |                 RenderUiSystem::ExtractText, | ||||||
|             ) |             ) | ||||||
|  | |||||||
| @ -53,7 +53,7 @@ impl Plugin for UiTextureSlicerPlugin { | |||||||
|                 .init_resource::<SpecializedRenderPipelines<UiTextureSlicePipeline>>() |                 .init_resource::<SpecializedRenderPipelines<UiTextureSlicePipeline>>() | ||||||
|                 .add_systems( |                 .add_systems( | ||||||
|                     ExtractSchedule, |                     ExtractSchedule, | ||||||
|                     extract_ui_texture_slices.after(extract_uinode_images), |                     extract_ui_texture_slices.in_set(RenderUiSystem::ExtractTextureSlice), | ||||||
|                 ) |                 ) | ||||||
|                 .add_systems( |                 .add_systems( | ||||||
|                     Render, |                     Render, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 ickshonpe
						ickshonpe