Special texture coord gen

I need to modify sphere mapping built into opengl just a bit. Near the end of the process, where the reflection vector is used
to generate the texture coordinates, I need to use to generate my own color value.
I could do the whole process in software,
but the speed might not be realtime.

I do not know how to use fragment programs or shader programs, so any helpful pointer
might be useful. Thanks

Shameless bump, but I really need some hints. Anybody please?

The fixed function doesn’t have a direct function to do what you want, unless you can figure out a way to do it with multitexturing and perhaps some other kind of TexGen.

You could also learn how to use ARB_vertex_program to generate your own spherical reflection texgen and color values. That would be my suggestion.

Thank you. I was afraid of this.

If color value is what you need, you could try to encode it into sphere map. Just like normalization cube maps do.
BTW, vertex_programs are not that hard, especially if you use something like Cg.

Actually, here is my main problem. I am trying to develop sphere mapping which is better than opengl’s built in. Supreme speed is not a concern.

The main problem I have is with distortions caused near the poles of the sphere map. This is related to another problem of generating random points, and distributing them evenly.
You cannot do this if you rely on the angle.

So far I have been playing around with it and have not succeeded in removing the polar distortion. This distortion is only a problem when my spheremap is repeated often across the surface. For example if the sphere map covers the whole surface no problems. If however I minify(sp) the texture, that is the grid structure is repeated more often, smaller on the surface, near the center I see a distortion from the pole of the sphere.