gre / gl-react

gl-react – React library to write and compose WebGL shaders

Home Page:https://gl-react-cookbook.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shaders turn black when resumes the app after minimizing

aaeronn opened this issue · comments

At first render my shader is working perfectly but when I minimize the app or press the home button and reopen the app my shader turns black.

I am not able to figure out the issue. Do anyone have any idea about it ?
Except this my shader and surface works fine.

using which backend implementation? gl-react-dom / gl-react-expo / gl-react-native ?

Using react-native

same for me, using gl-react-native

I was using gl-react-expo with something like this

<Surface style={{ width: 335, height: 100 }}>
    <ColorBlending
        color={Colors.cardMask}
        blendMode="blendMultiply"
    >
        {{ uri: 'https://i.imgur.com/iPKTONG.jpg' }}
    </ColorBlending>
</Surface>

and it was working fine, but I needed to change to gl-react-native and now some times it appears black, sometimes white and some times it appears correct as it should.

BTW, the ColorBlending is coming from gl-react-color-blending if someone could point me the right way to create a background with blend mode only using gl-react-native that will be nice

probably more relevant to raise this on react-native-webgl.
it's up to react-native-webgl to sync to latest codebase of expo gl implementation now (not much about gl-react-native)

I have not much time to work on react-native-webgl , hope more maintainers from react-community could help

Please try with latest version (v4) because I think it's fixed.