From f1d585ca337306ddd890253efeddcdc4038b4800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E4=B8=87=E6=8D=B7?= Date: Sun, 10 Jul 2016 16:29:22 +0800 Subject: [PATCH] fixed --- core/bsdf/microfacet.h | 2 +- gui/canvas.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/bsdf/microfacet.h b/core/bsdf/microfacet.h index 9537b19..ac621ed 100644 --- a/core/bsdf/microfacet.h +++ b/core/bsdf/microfacet.h @@ -56,7 +56,7 @@ __inline__ __device__ float microfacet_brdf_f(const glm::vec3& wi, const glm::ve //else auto wh = glm::normalize(wi + wo); - auto fresnelTerm = schlick_fresnel(1.f, ior, fmaxf(0.f, glm::dot(wh, wi))); + auto fresnelTerm = schlick_fresnel(1.f, ior, fmaxf(0.f, glm::dot(wh, wo))); auto geometryTerm = geometry_cook_torrance(wi, wo, normal, wh); #ifdef DISTRIBUTION_BECKMANN auto D = beckmann_distribution(normal, wh, alpha); diff --git a/gui/canvas.cpp b/gui/canvas.cpp index bcf3b28..310ab0e 100644 --- a/gui/canvas.cpp +++ b/gui/canvas.cpp @@ -7,8 +7,8 @@ Canvas::Canvas(const QGLFormat &format, QWidget *parent) : QGLWidget(format, parent) { // lights - lights.SetEnvironmentLight("LA_Downtown_Helipad_GoldenHour_Env.hdr"); - lights.SetEnvironmentLightIntensity(0.f); + lights.SetEnvionmentLight(glm::vec3(1.f)); + lights.SetEnvironmentLightIntensity(0.5f); setup_env_lights(lights.environmentLight); // render params