From 0c7cde80b2fb0ae0ba4b0fe58217eb69d62463e7 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Sun, 3 Nov 2019 20:43:52 +0930 Subject: [PATCH] Fix default normal texture --- src/texturegenerator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/texturegenerator.cpp b/src/texturegenerator.cpp index acdca994..1375e2ef 100644 --- a/src/texturegenerator.cpp +++ b/src/texturegenerator.cpp @@ -249,7 +249,7 @@ void TextureGenerator::generate() m_resultTextureBorderImage->fill(Qt::transparent); m_resultTextureNormalImage = new QImage(TextureGenerator::m_textureSize, TextureGenerator::m_textureSize, QImage::Format_ARGB32); - m_resultTextureNormalImage->fill(QColor(127, 127, 127)); + m_resultTextureNormalImage->fill(QColor(128, 128, 255)); m_resultTextureMetalnessRoughnessAmbientOcclusionImage = new QImage(TextureGenerator::m_textureSize, TextureGenerator::m_textureSize, QImage::Format_ARGB32); m_resultTextureMetalnessRoughnessAmbientOcclusionImage->fill(QColor(255, 255, 0)); @@ -460,14 +460,14 @@ void TextureGenerator::generate() //textureNormalPainter.drawImage(0, 0, findNormalTextureResult->second); //textureNormalPainter.setClipping(false); hasNormalMap = true; - } else { + }/* else { const auto &triangleNormal = triangleNormals[i]; QColor brushColor; brushColor.setRedF((triangleNormal.x() + 1) / 2); brushColor.setGreenF((triangleNormal.y() + 1) / 2); brushColor.setBlueF((triangleNormal.z() + 1) / 2); textureNormalPainter.fillPath(path, brushColor); - } + }*/ // Copy metalness texture if there is one auto findMetalnessTextureResult = m_partMetalnessTextureMap.find(source.first); if (findMetalnessTextureResult != m_partMetalnessTextureMap.end()) {