scene font rendering
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_font.fs
diff --git a/shaders/scene_font.fs b/shaders/scene_font.fs
new file mode 100644 (file)
index 0000000..27241fe
--- /dev/null
@@ -0,0 +1,26 @@
+uniform sampler2D uTexGarbage; // unused
+uniform sampler2D uTexMain;
+uniform vec3 uCamera;
+uniform vec4 uPlane;
+
+#include "common_scene.glsl"
+#include "motion_vectors_fs.glsl"
+
+void main()
+{
+   compute_motion_vectors();
+
+   vec3 vfrag = vec3(0.5,0.5,0.5);
+   vec4 vsamplemain = texture( uTexMain, aUv );
+   vec3 qnorm = aNorm.xyz;
+
+   vfrag = vsamplemain.rgb;
+
+   if( g_light_preview == 1 )
+   {
+      vfrag = vec3(0.5);
+   }
+
+   vfrag = scene_compute_lighting( vfrag, qnorm, aWorldCo );
+   oColour = vec4( vfrag, 1.0 );
+}