Hi there,
Due to lack of of a proper code for a ksybox, i built myself a ‘manual’ skybox, by positioning 6 quads around a sphere.
The code is working fine, no prob there, but i got some troubles with the ‘right’ texture mapping filters for my ‘walls’
For my center shining sphere i use:
texSphere.setTexParameteri(GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
texSphere.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);
gl.glTexGeni(GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
gl.glTexGeni(GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
gl.glTexGeni(GL.GL_R, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
gl.glEnable(GL.GL_TEXTURE_GEN_S);
gl.glEnable(GL.GL_TEXTURE_GEN_T);
gl.glEnable(GL.GL_TEXTURE_GEN_R);
For my walls i use the same…
Now during the rotation of the sourounding cube, my ‘wall’ textures moving and bending around too. I mean that looks fancy, but i want to have static textures for the walls.
Does any of you have an idea, how to use these texture filters properly to create an ‘correct’ environment mapping?
Thanks,
Regards,
normen