float[] RGBA(100);
void RGBShader() {
for (int i=0; i<100; i++) {
RGBA = i;
}
}
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
int-float with arrays
I am having trouble converting from int to float using arrays. The following works if I use an array of integers, but when using floats it doesn't work (as shown below). I tried casting it to a float but that didn't work as well? Anybody have an idea of what I am doing wrong? Is there a better way to do this?
The goal here is to pass a block of floating point pixel values and have the script manipulate it. I could use a two dimensional function, but the computation has to be fast. I will probably run some tests comaring the array method, function call method, and a standard C code method to see what the overhead performance is like. Just want to get the array method working. If not possible, no worries, i'll stick with the function calls.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement