From b03109dbb087bd441c0e3905753f3dd97d44d7b8 Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 2 Jan 2025 15:42:05 +1100 Subject: Simpler depth prepass shader --- intermediate/surface_depthonly.glsl | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 intermediate/surface_depthonly.glsl (limited to 'intermediate/surface_depthonly.glsl') diff --git a/intermediate/surface_depthonly.glsl b/intermediate/surface_depthonly.glsl new file mode 100644 index 0000000..f53a937 --- /dev/null +++ b/intermediate/surface_depthonly.glsl @@ -0,0 +1,43 @@ +#ifdef DESC +[program] +type: graphics +vertex: main +fragment: main + +[binding] +name: mesh +rate: vertex +[attribute] +name: position +type: vec3 + +[struct] +name: MVP +[variable] +name: model +type: mat4 +[variable] +name: view_projection +type: mat4 + +[cbuffer] +name: c_mvp +type: MVP +stage: vertex + +#endif + +#ifdef VERTEX_SHADER + +void main() { + vec4 pos = c_mvp.model * vec4(position, 1.0); + gl_Position = c_mvp.view_projection * pos; +} + +#endif + +#ifdef FRAGMENT_SHADER + +void main() {} + +#endif -- cgit v1.2.3-54-g00ecf