I am trying to create a simple ray tracer. I have a perspective view that shows rays visible for debugging purposes.
In my screenshot below, I have one white sphere to be emitted, and a green sphere representing the eye.
Rays are drawn as lines with
glLineWidth (10.0f)
If a ray passes a sphere, it is assigned a color
glColor4ub (100,100,100,100);
in my initialization code, I have the following:
glEnable (GL_ALPHA_TEST);
glAlphaFunc (GL_GREATER, 0.0f);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_SRC_ALPHA);
In the screenshot you can see that for some reason, the rays passing between the point of view and the sphere are mixed with the axis of the line behind the sphere, and not with the sphere itself.
Here is a screenshot:

- , ?
!!
user134304