Skip to content

Commit 089bfb0

Browse files
committed
contents/en/documents/2.9: update image
1 parent 6ab3665 commit 089bfb0

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed
55.9 KB
Loading

contents/en/documents/2.9.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,8 @@ <h3>Improved Rendering Quality for Vector Graphics</h3>
1515
<p>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 <code>Blend</code> option. The implementation was inspired by Evan Wallace’s blog post, <a href="https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac">“Easy Scalable Text Rendering on the GPU”</a>.</p>
1616
<p>The functions added for the new rendering method are mainly <a href="https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2/vector#FillPath"><code>vector.FillPath()</code></a> and <a href="https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2/vector#StrokePath"><code>vector.StrokePath()</code></a>. To use the new rendering method, calls to the old <code>AppendVerticesAndIndicesFor…</code> functions need to be replaced with the new ones. The rendering results of the existing <code>AppendVerticesAndIndicesFor…</code> 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.</p>
1717
<figure>
18-
<div class="grid-container">
19-
<div class="grid-item-2">
20-
<p class="img"><a href="/images/documents/2.9/before.png"><img src="/images/documents/2.9/before.png" width="360" ></a></p>
21-
</div>
22-
<div class="grid-item-2">
23-
<p class="img"><a href="/images/documents/2.9/after.png"><img src="/images/documents/2.9/after.png" width="360" ></a></p>
24-
</div>
25-
</div>
26-
<figcaption>Comparison between the previous vector graphics rendering and the new vector graphics rendering</figcaption>
18+
<p class="img"><img src="/images/documents/2.9/vector.png" width="744" ></p>
19+
<figcaption>Comparison between the old and new vector graphics rendering methods</figcaption>
2720
</figure>
2821
<h3>New APIs</h3>
2922
<ul>

contents/ja/documents/2.9.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,8 @@ <h3>ベクターグラフィックスの描画クオリティ向上</h3>
1515
<p>新しい手法では、特殊なシェーダーを用いて独自のステンシルバッファーを作成し、そのステンシルバッファーを使って色を塗りつぶすようにしました。これにより、同程度かそれ未満のテクスチャ使用量でも 1 ピクセルあたりのサンプル数が増え、描画結果の質が向上しました。また、複数の三角形を重ねて描画するのではなく、完成されたステンシルバッファーを一気に塗りつぶすため、半透明色を使った描画や <code>Blend</code> オプションの指定が正しく動作するようになりました。実装にあたっては Evan Wallace さんのブログ記事「<a href="https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac">Easy Scalable Text Rendering on the GPU</a>」を参考にさせていただきました。</p>
1616
<p>新描画手法のために追加された関数は主に <a href="https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2/vector#FillPath"><code>vector.FillPath()</code></a><a href="https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2/vector#StrokePath"><code>vector.StrokePath()</code></a> になります。新描画手法を使用するためには、これまでの <code>AppendVerticesAndIndicesFor</code>… 関数呼出しを、新しい関数呼び出しに置き換える必要があります。これまでの <code>AppendVerticesAndIndicesFor</code>… 関数に関しては描画の結果は変わりません。また、これらの関数は非推奨になります。非推奨関数は、 Ebitengine のメジャーバージョンが同じである限り、これまで通り動きます。ただし、新しいメジャーバージョンでは削除される可能性があります。</p>
1717
<figure>
18-
<div class="grid-container">
19-
<div class="grid-item-2">
20-
<p class="img"><a href="/images/documents/2.9/before.png"><img src="/images/documents/2.9/before.png" width="360" ></a></p>
21-
</div>
22-
<div class="grid-item-2">
23-
<p class="img"><a href="/images/documents/2.9/after.png"><img src="/images/documents/2.9/after.png" width="360" ></a></p>
24-
</div>
25-
</div>
26-
<figcaption>これまでのベクターグラフィックス描画と新しいベクターグラフィックス描画の比較</figcaption>
18+
<p class="img"><img src="/images/documents/2.9/vector.png" width="744" ></p>
19+
<figcaption>ベクターグラフィックス描画の新旧手法比較</figcaption>
2720
</figure>
2821
<h3>新しい API</h3>
2922
<ul>

0 commit comments

Comments
 (0)