]> git.tdb.fi Git - libs/gl.git/commitdiff
Write the occluder shader in GLSL
authorMikko Rasa <tdb@tdb.fi>
Sun, 31 May 2020 21:53:04 +0000 (00:53 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 31 May 2020 21:53:23 +0000 (00:53 +0300)
shaderlib/occluder.glsl [new file with mode: 0644]
source/occludedscene.cpp

diff --git a/shaderlib/occluder.glsl b/shaderlib/occluder.glsl
new file mode 100644 (file)
index 0000000..e46ca02
--- /dev/null
@@ -0,0 +1,11 @@
+import msp_interface;
+#pragma MSP stage(vertex)
+void main()
+{
+       gl_Position = projection_matrix*eye_obj_matrix*vertex;
+}
+#pragma MSP stage(fragment)
+void main()
+{
+       frag_color = vec4(1.0);
+}
index b3219123e8a2ed777d1a3a75d3691864e943712b..8a3b74262430fcc134884b04c8d17c17bd8fd5a3 100644 (file)
@@ -14,7 +14,7 @@ namespace GL {
 
 OccludedScene::OccludedScene():
        bounding_mesh((VERTEX3, NORMAL3)),
-       bounding_shader(ProgramBuilder::StandardFeatures()),
+       bounding_shader("occluder.glsl"),
        occluder_min_size(0.25f),
        cache_dirty(false)
 {