From 3d80d9851348b813039345b688fe51b61876ecf0 Mon Sep 17 00:00:00 2001 From: wuyize Date: Tue, 11 Oct 2022 23:21:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=BA=BF=E6=9D=A1=E8=B5=B7?= =?UTF-8?q?=E5=A7=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArchitectureColoredPainting.vcxproj | 2 +- ArchitectureColoredPainting/RendererWidget.cpp | 2 +- ArchitectureColoredPainting/Shaders/painting.comp | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj index c8babd2..334afac 100644 --- a/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj +++ b/ArchitectureColoredPainting/ArchitectureColoredPainting.vcxproj @@ -31,7 +31,7 @@ - 5.15.0_msvc2019_64 + 5.15.2_msvc2019_64 core;gui;widgets debug diff --git a/ArchitectureColoredPainting/RendererWidget.cpp b/ArchitectureColoredPainting/RendererWidget.cpp index b034184..70896ac 100644 --- a/ArchitectureColoredPainting/RendererWidget.cpp +++ b/ArchitectureColoredPainting/RendererWidget.cpp @@ -9,7 +9,7 @@ //QVector3D lightPositions[] = { 2000 * QVector3D(0.2, 4, 1).normalized(), QVector3D(100,100,100) ,QVector3D(-100,100,100) ,QVector3D(100,100,-100) }; QVector3D lightColors[] = { 20 * QVector3D(0.7529,0.7450,0.6784).normalized(), QVector3D(0,0,0) ,QVector3D(0,0,0) ,QVector3D(0,0,0) }; -static float sunPitch = 90, sunYaw = 80; +static float sunPitch = 105, sunYaw = 80; static int sunSpeed = 10; RendererWidget::RendererWidget(QWidget* parent) diff --git a/ArchitectureColoredPainting/Shaders/painting.comp b/ArchitectureColoredPainting/Shaders/painting.comp index b27a2b3..0995dd6 100644 --- a/ArchitectureColoredPainting/Shaders/painting.comp +++ b/ArchitectureColoredPainting/Shaders/painting.comp @@ -765,7 +765,10 @@ bool drawElement(uint elementIndex, vec2 localUV, out vec3 color, inout vec3 deb elementData[pointsOffset + 2 * p2Index + 1]); vec2 p3 = vec2(elementData[pointsOffset + 2 * p3Index], elementData[pointsOffset + 2 * p3Index + 1]); - + if(distance(localUV, p0)<0.01) + if( bound.z==p0.x ) + debugBVH = vec3(0,0,1); + else debugBVH = vec3(1,1,1); if (p0 == p1 && p2 == p3) { num_its += segment_int_test(localUV, p0, p3);