mirror of
https://github.com/expo/gl-react.git
synced 2026-11-15 17:34:34 -10:00
A bug appeared in very advanced usage of gl-react:
when you have a complex graph with more than 1 "childrenContext",
it was misplaced in the wrong order.
I'm not 100% sure this present fix is the proper fix and we might consider a more robust way.
The problem happens between dependencies across childrenContext.
"childrenContext" are only created when the result of your GL.Node is shared
across the "children" (shared between multiple uniforms or at multiple level).
For instance, if you define a <BlurWithMap map={<Gradient />} ... />
that <Gradient /> instance will be put in the childrenContext array
because each Blur Pass will depend on it. So it needs to be rendered once, before them.
The bug so far still not happen. But it will happen once you have a second childrenContext
and IF the first childrenContext depends on it.
(Later will try to document what are all these concepts.)