revisiting texture id == 15 bug
- Lingua principale
- Python
- Stelle
- 93.9k
- Fork
- 7.7k
- Merge medio
- 2g 13h
- PR unite (30g)
- 4
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
L'issue punta a camera.py righe 497-498, dove un hack incrementa n_textures quando raggiunge 15. Prima, verifica la versione attuale di moderngl e testa se il bug ora si verifica a texture id 31. Esegui il modulo camera e crea scene che usano molte texture per riprodurre il problema. Controlla lo StackOverflow collegato per informazioni sui limiti degli indici texture in moderngl. Determina se è necessaria una correzione più robusta, come la gestione dinamica dei texture IDs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100