3

I need the GLSL equivalent of

float f; 
int   i = *(int *)&f;

I know that there is floatBitsToInt() , but unfortunately it's in 3.3 GL version and upper. I need it for 3.0.

Any thoughts?

Marcel
  • 269
  • 2
  • 15
  • 3
    I don't think that there is any practical way to emulate this in GLSL 1.30. However, since any real-world GPU supporting GL 3.0 also supports 3.3, I think your request is very questionable. – derhass Dec 29 '17 at 17:14
  • 1
    It's not about a hardware - it's about software dependencies I have to use. – Marcel Dec 30 '17 at 00:31

0 Answers0