I ran into a shader issue on a 2014 Kindle Fire HDX where using floatBitsToInt on a variable changes it to an invalid state for the rest of the shader. I attached the shader where I first found the issue with some comments explaining the problem.
I have been able to reproduce this in multiple other shaders where if I add a line of code that reinterpret casts a variable in a shader, then it goes into an invalid state. So something like this will trigger the bug and Output0 will have an invalid color assigned to it:
void main()
{
vec4 color = texture(textureName, uvs);
float test = floatBitsToInt(color.x) != 0 ? 1.0f : 0.5f;
color.x = test;
Output0 = color;
}
We were able to successfully reproduce the issue on an Amazon Fire HDX with the shader supplied.
We willl keep you informed of any progress regarding resolution of this issue.
Thanks for the detailed report.
Hello Jordan.
This issue should be fixed after the device is updated to Android 5.1 or greater.
If the device is updated and you experience the issue please let us know.