shader += ".shader"
st.sub.append(Statement("shader", shader))
else:
- st.sub.append(Statement("shader", "_occluder.glsl.shader"))
+ st.sub.append(Statement("shader", "occluder.glsl.shader"))
tech_res.statements.append(st)
return tech_res
+++ /dev/null
-import msp_interface;
-#pragma MSP stage(vertex)
-void main()
-{
- gl_Position = clip_eye_matrix*eye_world_matrix*world_obj_matrix*vertex;
-}
-import common;
+import occluder;
import sphere_morph;
-
-#pragma MSP stage(fragment)
-void main()
-{
- frag_color = vec4(1.0);
-}
--- /dev/null
+import msp_interface;
+
+#pragma MSP stage(vertex)
+virtual vec4 get_vertex_position()
+{
+ return vertex;
+}
+
+virtual mat4 get_vertex_transform()
+{
+ return world_obj_matrix;
+}
+
+void main()
+{
+ gl_Position = clip_eye_matrix*eye_world_matrix*get_vertex_transform()*get_vertex_position();
+}
OccludedScene::OccludedScene():
bounding_mesh(Resources::get_global().get<Mesh>("_occluder.mesh")),
- bounding_shader(Resources::get_global().get<Program>("_occluder.glsl.shader")),
+ bounding_shader(Resources::get_global().get<Program>("occluder.glsl.shader")),
queries(OCCLUSION_QUERY, 0)
{
no_color_write.write_mask = WRITE_NONE;