Anti-aliasing(with vector graphics) failed with Winding Fill
- 主要語言
- Python
- 星號
- 93.9k
- 分支
- 7.7k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 4
描述
### Description
Anti-aliasing with vector graphics seems to be not working. Though it looks acceptable on 1080x1920 rendering results, it appears bad on the preview window. Things become worse when mobjects are small(e.g. thin stroke in an 'x' character).

The issue seems ubiqutous among VMobject, especially among VMobject with dense points like string and tex.
### How is this caused
I checked code and I think its caused by shader code changes. Now in the fragment shader of quadratic_bezier_fill(after winding fill was introduced, I think?), it no longers uses `smoothstep` to calculate the fragment alpha for a **smooth border**, which was the mechanism in vector graphics that did the anti-aliasing. Not fragments are `discard` when `Fxy == 0` directly. I'm not sure whether this issue can be fixed, or is this intended?
### Platform
My platform information: I'm on win10, python 3.9. I didn't encounter the problem until I upgrade across the recent commits(where winding-fill was introduced and rendering was refactored into shader wrappers), and the issue exists till the latest commits available(~Feb 16) on github.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
該 issue 指向 quadratic_bezier_fill 片段著色器,其中將透過 smoothstep 的抗鋸齒替換為 discard 條件。先檢查 manim 倉庫中的 shader 程式碼,可能位於 shaders 或 rendering 目錄下。尋找近期引入 winding fill 的提交。測試渲染小型 VMobjects 以查看 aliasing。要提出修復方案,需要理解 OpenGL 著色器和向量圖形渲染。
由索引模型根據 Issue 內容生成。
評估
- 領域
- backend, computer-graphics
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100