-
I am working on a program to do lightsaber effects. The algorithm can print it on a black background. I can add the color values using Get/SetPixel, but it does some weird things. Download the file here. You will need to right click and choose save file as. Just open it, click on a color button, and click the Get/Set Pixel button. Then click Ok! in the new window. You can see what I mean. Anyone know how to fix it? I know this program is disorganized. It is a test, so I can get the core to work before I implement most of the features.
-
-
I havent checked your source but are you weighting the colors? EG,
Code:
DispPixelColor = (BGColor * 0.2)+(FGColor * 0.8)
Otherwise, you'll get some funny results
-
I'm not. It averages the colors:
disp=(color1+color2)/2
-
Wait! Id adds the colors, as the saber is rendered on a clack background. However, assuming res is the result pixel color, I do have:
Code:
if res>RGB(255, 255, 255) then res=RGB(255,255,255)
So it should work.
-
It should work then. Maybe you don't have enough colors available on your local system?
-