summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/gl3/pervertexcolor.frag
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-04-11 14:58:17 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-23 11:14:30 +0000
commit0542f1614aa6d50c4c9809fb0ce5f1adb5666d67 (patch)
tree77a1ed41c16262f5cc7aa9ddb2d66d3f9b61a719 /src/extras/shaders/gl3/pervertexcolor.frag
parent8677f62fa690efa29fbb6f870af1ea2b4e7111cf (diff)
Move defaults and geometries out of Qt3DRender and into Qt3DExtras
QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/extras/shaders/gl3/pervertexcolor.frag')
-rw-r--r--src/extras/shaders/gl3/pervertexcolor.frag16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/extras/shaders/gl3/pervertexcolor.frag b/src/extras/shaders/gl3/pervertexcolor.frag
new file mode 100644
index 000000000..b5ed5a33d
--- /dev/null
+++ b/src/extras/shaders/gl3/pervertexcolor.frag
@@ -0,0 +1,16 @@
+#version 150 core
+
+in vec3 worldPosition;
+in vec3 worldNormal;
+in vec3 color;
+
+out vec4 fragColor;
+
+#pragma include light.inc.frag
+
+void main()
+{
+ vec3 diffuseColor;
+ adModel(worldPosition, worldNormal, diffuseColor);
+ fragColor = vec4( color + color * diffuseColor, 1.0 );
+}