What is difference between GL_SPHERE_MAP and GL_REFLECTION_MAP_NV (env.mapping)?

I’ve just implemented enviroment mapping using GL_SPHERE_MAP (like described in Red Bood) and another version of env.mapping using GL_REFLECTION_MAP_NV (extension GL_NV_texgen_reflection or GL_EXT_texgen_reflection)

Implementation is exactly the same, but result is looking totally different.

Does anybody know how works GL_REFLECTION_MAP_NV?

reflection mapping is for cubemaps, sphere mapping for simple 2d-textures

For more on the back ground of GL_NV_texgen_reflection have a look at View Independent and Environment maps and Realistic Hardware Accelerated Shading and Lighting by Heidrich et al. In the first of these papers, Heidrich proposed what became the NV_texgen_reflection extension.

-JasonM

I suggest using the ARB_texture_cube_map extension which gives you the same thing without the vendor-specific name :slight_smile: It was folded into OpenGL 1.3 as a core feature, too.

It was also in EXT_texture_cube_map. It’s a feature with a long and distinguished history.

  • Matt