Raytracing and GL_POINTER_BUFFER_BIT

Now, I’m sure that GL_POINTER_BUFFER_BIT can really be a good thing (such as GL_NORMAL_BUFFER_BIT )

With a pointer per pixel, we can retrieve for each pixel in the screen the object that make the first intersection with the ray that start at the eye, traverse the screen, and pointe the object.

So, we can raytrace this in another pass

I never really used vertex and fragment programs, but I see now a good start for begin with them …

@+
cyclone

In fact, this look more such as photon mapping, inverse raytrace or radiosity in my spirit …

For exemple, increment a value into objects pointed by the GL_POINTER_BUFFER (for each pixel in the screen), can give us the repartition of the energy transmitted from one light to each others object …

If the object is sphere-mapped or cube-mapped, this can handle a raytracer with two level of recursion (the first intersection and the first reflection)

One pass per light can certainly be a good tradeoff between make really nothing for extend OpenGL and want something that is certainly impossible to make NOW (cf. make realtime raytracing/radiosity/photonmapping with today hardware and a good old standardized API).

@+
cyclone