Closed drcmda closed 2 years ago
This should be fixed in #29
No more args
in anything. All non-uniforms are also converted to setters, the layers then call refresh()
on the material when a non unifom changes.
Also removed children
and args
from <LayerMaterial />
so it will not re-render needlessly
I'm having problems with the refresh of the LayoutMaterial, I suppose that PR solves it, when will it be available?
@Kevinparra535 Due to deeper underlying issues this PR has been incorporated into the upcoming 1.2.0
. You can track progress of it in https://github.com/pmndrs/lamina/pull/29
Will be available as time openes up for me to complete the release.
lamina will re-create the shader on every render because "children" is not a stable reference. children should rather inform lamina on mount, and when certain props have changed that it must refresh. this of course would duplicate refresh multiple times once you're dealing with multiple layers — this draft would try to work against that.