Thanks for clearing that up, it's slightly annoying but I can live with
it! :)
There is one thing I noticed when rendering my world to the cube is that
I had to rotate (roll) the camera 180 degrees for the horizontal faces
and +-90 degrees for the vertical (Y) views, just to get it orientated
and joined up correctly. This isn't mentioned anywhere on the Net it seems.
To test it, I'm using a single quad covering the screen and accessing
the cube map like this:-
Frag shader:-
// The texST goes from 0,0 to 1,1 across the entire screen.
vec2 texel = (-1.0+2.0*texST); // Get it in 2D -1 to +1 range
vec3 dir = vec3(texel, tanFOV); // Get a 3D ray using the
projection FOV as Z.
dir.x *= aspectRatio;
dir *= cameraMatrix; // Rotate it to the camera's angle
dir = normalize(dir);
vec3 colour = textureCube(EnvironmentCube, dir).xyz;
It works perfectly, but only if I rotate the cube map faces as mentioned
above. Is that a standard 'problem'?
Thanks,
Dave.