Forums - Problem with using floatBitsToInt in GLSL on Kindle

3 posts / 0 new
Last post
Problem with using floatBitsToInt in GLSL on Kindle
JordanL
Join Date: 12 Feb 14
Posts: 2
Posted: Thu, 2015-02-05 13:17

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;
}

 

  • Up0
  • Down0
Ayo Moderator
Profile picture
Join Date: 23 Jan 15
Posts: 31
Posted: Thu, 2015-02-12 11:52

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.

  • Up0
  • Down0
Ayo Moderator
Profile picture
Join Date: 23 Jan 15
Posts: 31
Posted: Thu, 2015-05-21 17:30

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.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.