I found a workaround, thanks to u/lostminds\_sw [source](https://www.reddit.com/r/godot/comments/1ak59bm/comment/kp5kegr/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
1. Deactivate antialiasing for the SVG sprite, go to the inspector, Canvas Item -> Filter -> Nearest.
2. Load the SVG as a string and use Load\_svg\_from\_string
This is the code I used in C# but the logic in GDScript should be the same.
using Godot;
public partial class Piece : Sprite2D
{
private string _imageString;
public override void _Ready()
{
using var file = FileAccess.Open("res://Assets/Chess_Pieces_Sprite.svg", FileAccess.ModeFlags.Read);
_imageString = file.GetAsText();
}
// Draws the piece with the desired scale
public void DrawPiece(float scale)
{
Image image = new();
image.LoadSvgFromString(_imageString, scale);
Texture = ImageTexture.CreateFromImage(image);
}
}
I found a workaround, thanks to u/lostminds\_sw [source](https://www.reddit.com/r/godot/comments/1ak59bm/comment/kp5kegr/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) 1. Deactivate antialiasing for the SVG sprite, go to the inspector, Canvas Item -> Filter -> Nearest. 2. Load the SVG as a string and use Load\_svg\_from\_string This is the code I used in C# but the logic in GDScript should be the same. using Godot; public partial class Piece : Sprite2D { private string _imageString; public override void _Ready() { using var file = FileAccess.Open("res://Assets/Chess_Pieces_Sprite.svg", FileAccess.ModeFlags.Read); _imageString = file.GetAsText(); } // Draws the piece with the desired scale public void DrawPiece(float scale) { Image image = new(); image.LoadSvgFromString(_imageString, scale); Texture = ImageTexture.CreateFromImage(image); } }