Bug 91 - Cube map extension defect.
Summary: Cube map extension defect.
Status: VERIFIED INVALID
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All windows
: P3 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2004-06-01 04:46 CEST by Sven Gothel
Modified: 2010-03-24 07:46 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:46:41 CET


---- Reported by nomeko 2004-06-01 16:46:18 ----

Automatically generated cube map texture coordinates are wrong.
Texture coordinates generated by setting 

glTexGenfv(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_EXT); 
glTexGenfv(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_EXT); 
glTexGenfv(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_EXT); 
glEnable(GL_TEXTURE_GEN_S); 
glEnable(GL_TEXTURE_GEN_T); 
glEnable(GL_TEXTURE_GEN_R);

are mapped to points on the cube, along the normal of the vertex, but in the 
negative direction. Thus a surface which should map to the sky in fact maps to 
the ground.

Texture coordinates are on the line defined by the normal, and not on the line 
defined by the reflected view vector. (The view vector, reflected by the 
surface, defined by the vertex and its normal)
Thus the "reflections" are view independent.

The generated mapping is quite convincing, until you check it out more closely. 
Transformation on the PROJECTION matrix leave the mapping unchanged, while 
transformation on the MODELVIEW matrix changes the mapping, as the normals are 
transformed.

I figured this bug could come from defects in my display drivers, but I've 
updated to NVIDIA’s recent drivers with no change.



---- Additional Comments From kbr 2004-06-03 17:59:45 ----

JOGL does nothing except make the underlying C function calls for all of the
routines mentioned above, so any issues are extremely unlikely to be caused by
JOGL. You may want to look at some existing demos that use JOGL under the hood
to perform this kind of reflection mapping. See for example Java Cool Dude's
demos at http://xith.org/demo/JavaCoolDude.php .




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:46 EDT  ---

This bug was previously known as _bug_ 91 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=91