mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-30 21:21:10 +00:00 
			
		
		
		
	Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378.
This commit is contained in:
		
							parent
							
								
									b494de34aa
								
							
						
					
					
						commit
						a089061120
					
				
					 5 changed files with 13 additions and 1 deletions
				
			
		|  | @ -99,12 +99,14 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 | |||
| 	} else { | ||||
| 		Ref<Texture> tex = p_from; | ||||
| 		img = tex->get_data(); | ||||
| 		if (img.is_valid()) { | ||||
| 			img = img->duplicate(); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if (img.is_null() || img->empty()) | ||||
| 		return Ref<Texture>(); | ||||
| 
 | ||||
| 	img = img->duplicate(); | ||||
| 	img->clear_mipmaps(); | ||||
| 
 | ||||
| 	if (img->is_compressed()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Juan Linietsky
						Juan Linietsky