From 41080b1c1e2d9dd669b3ece473325d4c8e5c87bf Mon Sep 17 00:00:00 2001 From: wuyize Date: Wed, 15 Feb 2023 17:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArchitectureColoredPainting.vcxproj | 1 + ...rchitectureColoredPainting.vcxproj.filters | 3 ++ .../src/Renderer/IblUtils.cpp | 7 +++- .../FramelessHelperCore.vcxproj | 2 +- .../FramelessHelperCore.vcxproj.filters | 36 ------------------- .../FramelessHelperWidgets.vcxproj | 2 +- .../FramelessHelperWidgets.vcxproj.filters | 34 ------------------ UnitTest/UnitTest.vcxproj | 2 +- 8 files changed, 13 insertions(+), 74 deletions(-) diff --git a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj index 6aebcea..10543ef 100644 --- a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj +++ b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj @@ -196,6 +196,7 @@ + diff --git a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj.filters b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj.filters index 6da4337..7afcfc8 100644 --- a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj.filters +++ b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj.filters @@ -432,6 +432,9 @@ Header Files\Renderer + + Header Files\Renderer\Painting + diff --git a/ArchitectureColoredPainting/src/Renderer/IblUtils.cpp b/ArchitectureColoredPainting/src/Renderer/IblUtils.cpp index 28cbd98..7324bc6 100644 --- a/ArchitectureColoredPainting/src/Renderer/IblUtils.cpp +++ b/ArchitectureColoredPainting/src/Renderer/IblUtils.cpp @@ -240,7 +240,7 @@ GLuint Renderer::IblUtils::generateCubemap(QOpenGLFunctions_4_5_Core* glFunc, GL glFunc->glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glFunc->glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFunc->glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - glFunc->glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); // enable pre-filter mipmap sampling (combatting visible dots artifact) glFunc->glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -272,6 +272,11 @@ GLuint Renderer::IblUtils::generateCubemap(QOpenGLFunctions_4_5_Core* glFunc, GL renderCube(glFunc); } glFunc->glBindFramebuffer(GL_FRAMEBUFFER, 0); + + // then let OpenGL generate mipmaps from first mip face (combatting visible dots artifact) + glFunc->glBindTexture(GL_TEXTURE_CUBE_MAP, envCubemap); + glFunc->glGenerateMipmap(GL_TEXTURE_CUBE_MAP); + return envCubemap; } diff --git a/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj b/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj index ed54205..30a2de9 100644 --- a/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj +++ b/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj @@ -14,7 +14,7 @@ {954D3D24-DF86-33A3-8867-D1735CCBDB10} FramelessHelperCore QtVS_v304 - 10.0.22000.0 + 10.0 10.0.22000.0 $(MSBuildProjectDirectory)\QtMsBuild diff --git a/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj.filters b/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj.filters index d972081..9a21dad 100644 --- a/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj.filters +++ b/FramelessHelper/qmake/FramelessHelperCore/FramelessHelperCore.vcxproj.filters @@ -137,42 +137,6 @@ - - - - - - - - - - - - - - - - - - - - Generated Files - - - Generated Files - - - - - - - - - - - - - Resource Files diff --git a/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj b/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj index 187d235..3765ad1 100644 --- a/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj +++ b/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj @@ -14,7 +14,7 @@ {E7A71E05-4AA5-31DB-A17D-542FC7BD83A3} FramelessHelperWidgets QtVS_v304 - 10.0.22000.0 + 10.0 10.0.22000.0 $(MSBuildProjectDirectory)\QtMsBuild diff --git a/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj.filters b/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj.filters index 58050a2..a341890 100644 --- a/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj.filters +++ b/FramelessHelper/qmake/FramelessHelperWidgets/FramelessHelperWidgets.vcxproj.filters @@ -95,39 +95,5 @@ Header Files - - - - - - - - - - - - - - - - - - - - Generated Files - - - Generated Files - - - - - - - - - - - \ No newline at end of file diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj index 8937397..9ea033b 100644 --- a/UnitTest/UnitTest.vcxproj +++ b/UnitTest/UnitTest.vcxproj @@ -65,7 +65,7 @@ stdcpp20 - $(VCInstallDir)UnitTest\include;$(SolutionDIr)ArchitectureColoredPainting;$(SolutionDIr)ArchitectureColoredPainting\src;$(SolutionDir)ArchitectureColoredPainting\src\Editor\RightBar;$(SolutionDir)ArchitectureColoredPainting\src\Editor\;$(SolutionDIr)ArchitectureColoredPainting\x64\Debug\uic;$(SolutionDir)FramelessHelper\include;$(SolutionDir)FramelessHelper\qmake\inc\core;$(SolutionDir)FramelessHelper\include\FramelessHelper\Core;%(AdditionalIncludeDirectories) + $(VCInstallDir)UnitTest\include;$(SolutionDIr)ArchitectureColoredPainting;$(SolutionDIr)ArchitectureColoredPainting\include;$(SolutionDIr)ArchitectureColoredPainting\src;$(SolutionDir)ArchitectureColoredPainting\src\Editor\RightBar;$(SolutionDir)ArchitectureColoredPainting\src\Editor\;$(SolutionDIr)ArchitectureColoredPainting\x64\Debug\uic;$(SolutionDir)FramelessHelper\include;$(SolutionDir)FramelessHelper\qmake\inc\core;$(SolutionDir)FramelessHelper\include\FramelessHelper\Core;%(AdditionalIncludeDirectories) FRAMELESSHELPER_WIDGETS_STATIC;_DEBUG;%(PreprocessorDefinitions)