Rennie Johnson
06-22-2012, 12:39 PM
I notice the C modulus operator "%" doesn't work without GL_EXT_gpu_shader4 enabled, which I would prefer not to do. Furthermore, I don't know if that would be eqivalent the basic C modulus function. I see there are a few versions of the "mod" function:
genType mod(genType x, genType y);
genDType mod(genDType x, genDType y);
The specification describes these functions as taking float values. I don't understand the type specifiers "genType" and "genDType" referenced before.
How can I do a simple modulus operation? The Equivalent C code would be:
int sourceNumber = 97;
int oddEven = sourceNumber%2;
genType mod(genType x, genType y);
genDType mod(genDType x, genDType y);
The specification describes these functions as taking float values. I don't understand the type specifiers "genType" and "genDType" referenced before.
How can I do a simple modulus operation? The Equivalent C code would be:
int sourceNumber = 97;
int oddEven = sourceNumber%2;