revisiting texture id == 15 bug
- Vorherrschende Sprache
- Python
- Sterne
- 93.9k
- Forks
- 7.7k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Regarding the bug when texture id becomes 15 at [camera.py](https://github.com/3b1b/manim/blob/master/manimlib/camera/camera.py#L497-L498), the following temporary hack was introduced in 2021 ([commit](https://github.com/3b1b/manim/commit/82fa6ab125c3dff4c775f68de3de1b3adf9e585e))
```python
if self.n_textures == 15: # I have no clue why this is needed
self.n_textures += 1
```
Can we verify that this still applies now? Because for my case I found the bug now appears at 31 instead of 15. It's plausible to me that this may be a moderngl version issue because of the shift from 2^4-1 to 2^5-1, in which case we may want a smarter way to fix this bug. It would be nice if others can check this too!
As for the cause, here's something I found online:
https://stackoverflow.com/questions/64317804/why-does-texture-index-31-is-overridden-in-moderngl
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Der Issue verweist auf camera.py Zeilen 497-498, wo ein Hack n_textures incrementiert, wenn es 15 erreicht. Zuerst verifiziere die aktuelle moderngl-Version und teste, ob der Bug jetzt bei texture id 31 auftritt. Führe das camera-Modul aus und erstelle Szenen, die viele Texturen verwenden, um das Problem zu reproduzieren. Prüfe den verlinkten StackOverflow für Einblicke in Texture-Index-Limits in moderngl. Bestimme, ob eine robustere Korrektur nötig ist, wie z. B. das dynamische Verwalten von texture IDs.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- computer-graphics
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100