In our Babylon React Native app I have a shader in a custom material plugin that uses a texture sampler to lookup vertex color, but the vertical texture coordinate seems to get inverted when the app is built for iOS compared to Android. Anyone know why this might be the case and if there’s a workaround or trick?
I should mention, I’m not using the mesh texture coords, I’m calculating a texCoord.V in the shader based on a number I pass in.
It makes sense. texture look up in inverted in V between opengl/webgl and all the other APIs.
The trick used in BN is to flip the texture sampling. It looks like this inversion is not done per vertex shader.
So, you should be able to repro the issue with babylonnative. Then, when you do, check that replacing this line :
Sorry no not yet. I haven’t had an opportunity this sprint to test it out. Until I can, I just added a temporary workaround sending an inverted texCoord.V to the shader if iOS.