From d31b672d002c685d15f01a59c17c99a8d164d13e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 1 Jun 2020 00:53:04 +0300 Subject: [PATCH] Write the occluder shader in GLSL --- shaderlib/occluder.glsl | 11 +++++++++++ source/occludedscene.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 shaderlib/occluder.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) { -- 2.45.2