summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/shaders/environment/SCsub
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-05-20 12:52:19 +1000
committerBastiaan Olij <mux213@gmail.com>2022-06-22 12:50:17 +1000
commit997810e417cb1f003bacf784f7a07140f7a1b583 (patch)
tree7a85525c501dd3c6ac192167211b7a977115eef0 /servers/rendering/renderer_rd/shaders/environment/SCsub
parentc18d0f20357a11bd9cfa2f57b8b9b500763413bc (diff)
Split GI effects and fix stereoscopic rendering of GI effects
Diffstat (limited to 'servers/rendering/renderer_rd/shaders/environment/SCsub')
-rw-r--r--servers/rendering/renderer_rd/shaders/environment/SCsub17
1 files changed, 17 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shaders/environment/SCsub b/servers/rendering/renderer_rd/shaders/environment/SCsub
new file mode 100644
index 0000000000..fc513d3fb9
--- /dev/null
+++ b/servers/rendering/renderer_rd/shaders/environment/SCsub
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+Import("env")
+
+if "RD_GLSL" in env["BUILDERS"]:
+ # find all include files
+ gl_include_files = [str(f) for f in Glob("*_inc.glsl")]
+
+ # find all shader code(all glsl files excluding our include files)
+ glsl_files = [str(f) for f in Glob("*.glsl") if str(f) not in gl_include_files]
+
+ # make sure we recompile shaders if include files change
+ env.Depends([f + ".gen.h" for f in glsl_files], gl_include_files)
+
+ # compile shaders
+ for glsl_file in glsl_files:
+ env.RD_GLSL(glsl_file)