Closed zdenham closed 6 years ago
Update: this function outputs correctly on simulator (that is the same as webgl), but if built to any real iOS device it outputs something similar to the second image above.
have you tried to define a precision
? like precision highp float;
ahhh yes, I had been using mediump. This did the trick! Thank you for your help!
Hello! Thanks for the wonderful library!
I am implementing a film grain image effect, and it involves a noise function and the below 2D random function (taken from book of shaders). I was able to implement the effect nicely in webgl, but when using react-native-webgl, the randomness and noise functions both had unexpected and very different outputs than webgl. The following shader:
Outputed:
In webgl, but in react-native-webgl outputed: (which does not appear very random). I am wondering why the output is so inconsistent between the two platforms, if the difference can be remedied, or if it is a hardware problem... Any advice would be greatly appreciated!