Set color depth in a bitmap

I was trying to render some lights using a shader written in GLSL. The result is pretty good (See image 1), But there are still some artifacts that look ugly (See image 2, I have increased the contrast).

From what I have read I think that they are formed because the color depth of the bitmap Im drawing to is not enough.

I have tried setting these options before creating the display:

1 al_set_new_display_option(ALLEGRO_COLOR_SIZE, x, ALLEGRO_REQUIRE); 2 al_set_new_display_option(ALLEGRO_RED_SIZE, y, ALLEGRO_REQUIRE ); 3 al_set_new_display_option(ALLEGRO_GREEN_SIZE, y, ALLEGRO_REQUIRE ); 4 al_set_new_display_option(ALLEGRO_BLUE_SIZE, y, ALLEGRO_REQUIRE ); 5 al_set_new_display_option(ALLEGRO_ALPHA_SIZE, y, ALLEGRO_REQUIRE ); 6 al_set_new_display_flags(ALLEGRO_OPENGL_3_0 | ALLEGRO_PROGRAMMABLE_PIPELINE);

Where x = 32 and y = 8 is the only combination a have tried where display was successful created.

How should I do it ?

(I dont know if this is enough information to address the problem, but I suspect it is something trivial that Im unable to resolve )

Thread #616603. Printed from