From 997810e417cb1f003bacf784f7a07140f7a1b583 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Fri, 20 May 2022 12:52:19 +1000 Subject: Split GI effects and fix stereoscopic rendering of GI effects --- servers/rendering/renderer_rd/shaders/environment/SCsub | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 servers/rendering/renderer_rd/shaders/environment/SCsub (limited to 'servers/rendering/renderer_rd/shaders/environment/SCsub') 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) -- cgit v1.2.3