Initializing a float variable, reverting to int?

Aug 27, 2013 at 7:52 PM
I'm not sure if anyone else has noticed this, but it seems as if I am intializing a variable as float and it is reverting to int. I am noticing this when I am using very large numbers. Everything looks fine when I intialize the variable, but as soon as I copy it over to the GPU it looks like it is being cast to an int. This is my first project using GPU so forgive me if I am not doing something basic correctly.
Aug 28, 2013 at 1:50 AM
Very simple solution to this problem. See below:
float a = 3000000000; //This will save the assigned value as a double, thus all size constraits of a double will be binding.
float b = 3000000000F; //This will save the assigned value as proper a float value.
It's all spelled out very nicely here.