My shader implicitly casts an int to float, which results in a C7011 warning.
int i = 1;
float f = i;
I don’t care and never will care about this warning. However, when trying to debug my shader, I have to wade through a bunch of these warnings to find an error. Is there any way to suppress these warnings?
I tried looking up options for #pragma, but I couldn’t find anything.
Thanks in advance.
Not sure if this helps you much, but maybe check out the quick reference for the version of glsl you are using. It looks like, according to page 7 of the 4.20 GLSL quick reference sheet, found at http://www.khronos.org/files/opengl42-quick-reference-card.pdf, that you could just go with float f = float(i), thought I am not on a computer I can current test that on.
If that doesn’t work, you may want to check out intBitsToFloat funciton found on page 9 of the same reference sheet. Though it only exists on glsl version 3.3 and above, if you are using that version or greater, it might give you the conversion you want.