From: Mikko Rasa Date: Sun, 31 May 2020 21:53:04 +0000 (+0300) Subject: Write the occluder shader in GLSL X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d31b672d002c685d15f01a59c17c99a8d164d13e;p=libs%2Fgl.git Write the occluder shader in GLSL --- diff --git a/shaderlib/occluder.glsl b/shaderlib/occluder.glsl new file mode 100644 index 00000000..e46ca02b --- /dev/null +++ b/shaderlib/occluder.glsl @@ -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); +} diff --git a/source/occludedscene.cpp b/source/occludedscene.cpp index b3219123..8a3b7426 100644 --- a/source/occludedscene.cpp +++ b/source/occludedscene.cpp @@ -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) {