From bf2d39541c75af4d1b6c7c9965ce6774198908a4 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 3 Sep 2014 13:29:40 +0200 Subject: [PATCH] Fixed cubemaps rendering (Skyboxes) Former-commit-id: a8d065cbdf8bdbde55547739e53b4daa6ce2969d --- src/Nazara/Graphics/SkyboxBackground.cpp | 4 ++-- src/Nazara/Renderer/OpenGL.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Nazara/Graphics/SkyboxBackground.cpp b/src/Nazara/Graphics/SkyboxBackground.cpp index d4347d25f..d1d7b8ca3 100644 --- a/src/Nazara/Graphics/SkyboxBackground.cpp +++ b/src/Nazara/Graphics/SkyboxBackground.cpp @@ -87,7 +87,7 @@ namespace "void main()\n" "{\n" " gl_Position = WorldViewProjMatrix * vec4(VertexPosition, 1.0);\n" - " vTexCoord = vec3(VertexPosition.x, -VertexPosition.y, -VertexPosition.z);\n" + " vTexCoord = vec3(VertexPosition.x, VertexPosition.y, -VertexPosition.z);\n" "}\n"; const char* vertexSource140 = @@ -102,7 +102,7 @@ namespace "void main()\n" "{\n" " gl_Position = WorldViewProjMatrix * vec4(VertexPosition, 1.0);\n" - " vTexCoord = vec3(VertexPosition.x, -VertexPosition.y, -VertexPosition.z);\n" + " vTexCoord = vec3(VertexPosition.x, VertexPosition.y, -VertexPosition.z);\n" "}\n"; ///TODO: Remplacer ça par des ShaderNode diff --git a/src/Nazara/Renderer/OpenGL.cpp b/src/Nazara/Renderer/OpenGL.cpp index 476800edf..ef9e096d9 100644 --- a/src/Nazara/Renderer/OpenGL.cpp +++ b/src/Nazara/Renderer/OpenGL.cpp @@ -1941,8 +1941,8 @@ GLenum NzOpenGL::CubemapFace[] = { GL_TEXTURE_CUBE_MAP_POSITIVE_X, // nzCubemapFace_PositiveX GL_TEXTURE_CUBE_MAP_NEGATIVE_X, // nzCubemapFace_NegativeX - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, // nzCubemapFace_PositiveY (Inversion pour les standards OpenGL) - GL_TEXTURE_CUBE_MAP_POSITIVE_Y, // nzCubemapFace_NegativeY (Inversion pour les standards OpenGL) + GL_TEXTURE_CUBE_MAP_POSITIVE_Y, // nzCubemapFace_PositiveY + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, // nzCubemapFace_NegativeY GL_TEXTURE_CUBE_MAP_POSITIVE_Z, // nzCubemapFace_PositiveZ GL_TEXTURE_CUBE_MAP_NEGATIVE_Z // nzCubemapFace_NegativeZ };