From 499db6a1852f16cc53c89cd5ce74cf2c5d93269b Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 25 May 2014 21:43:37 +0200 Subject: [PATCH] Changed default shader to use normal as RGB (more useful for debugging). --- examples/common/OpenGLWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/common/OpenGLWidget.cpp b/examples/common/OpenGLWidget.cpp index c561d537..587ef1c5 100644 --- a/examples/common/OpenGLWidget.cpp +++ b/examples/common/OpenGLWidget.cpp @@ -89,7 +89,7 @@ void OpenGLWidget::initializeGL() vec3 normal = normalize(cross(dFdy(worldPosition.xyz), dFdx(worldPosition.xyz))); float color = clamp(abs(dot(normalize(normal.xyz), vec3(0.9,0.1,0.5))), 0, 1); - outputColor = vec4(1.0, 0.5, color, 1.0); + outputColor = vec4(abs(normal) * 0.5 + vec3(0.5, 0.5, 0.5), 1.0); } )")) {