Ebitengine 2.9 Release Notes

These release notes are a draft. v2.9.0 has not been released yet.

v2.9.0

Issues for v2.8.0

This release mainly adds minor features, bug fixes, and performance improvements.

Starting from Ebitengine 2.9, Go 1.24 or later is required.

Improved Rendering Quality for Vector Graphics

Issues: #3124, #3153, #3278

Previously, the vector package used functions such as AppendVerticesAndIndicesForFilling and AppendVerticesAndIndicesForStroke to decompose vector shapes into triangles, which were then rendered. This approach had the following issues:

The new approach uses a special shader to create a custom stencil buffer, which is then used to fill with colors. This increases the number of samples per pixel while consuming the same or fewer textures, improving rendering quality. Additionally, instead of drawing multiple overlapping triangles, the finished stencil buffer is filled at once, allowing correct rendering of semi-transparent colors and proper handling of the Blend option. The implementation was inspired by Evan Wallace’s blog post, “Easy Scalable Text Rendering on the GPU”.

The functions added for the new rendering method are mainly vector.FillPath() and vector.StrokePath(). To use the new rendering method, calls to the old AppendVerticesAndIndicesFor… functions need to be replaced with the new ones. The rendering results of the existing AppendVerticesAndIndicesFor… functions remain unchanged. These functions are now deprecated. The deprecated functions will continue to work as long as Ebitengine remains in the same major version, but they may be removed in future major versions.

Comparison between the previous vector graphics rendering and the new vector graphics rendering

Bug Fixes

In addition to the fixes listed below, this release also includes all bug fixes from version 2.8.

New APIs

Deprecated APIs

Up to 2.8 Since 2.9 Issue
ebiten.FillRule #3153
ebiten.DrawTrianglesOptions.AntiAlias vector.FillPath() #3153
ebiten.DrawTrianglesOptions.FillRule vector.FillPath() #3153
ebiten.DrawTrianglesShaderOptions.AntiAlias vector.FillPath() #3153
ebiten.DrawTrianglesShaderOptions.FillRule vector.FillPath() #3153
audio.Resample() audio.ResampleReader() #3194
audio.ResampleF32() audio.ResampleReaderF32() #3194
colorm.DrawTrianglesOptions.AntiAlias #3153
colorm.DrawTrianglesOptions.FillRule #3153
text/v2.GoTextFace.Script text/v2.GoTextFace.Language #3175
vector.Path.AppendVerticesAndIndicesForFilling() vector.FillPath() #3153
vector.Path.AppendVerticesAndIndicesForStroke() vector.FillPath() and vector.Path.AddStroke() #3153
vector.DrawFilledCircle() vector.FillCircle() #3150
vector.DrawFilledRect() vector.FillRect() #3150