Merge pull request #47125 from BastiaanOlij/SCsub_compile_shaders

Changed SCsub for shaders to find shaders automatically
This commit is contained in:
Rémi Verschelde 2021-03-18 11:20:57 +01:00 committed by GitHub
commit c097ce0c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,46 +3,15 @@
Import("env") Import("env")
if "RD_GLSL" in env["BUILDERS"]: if "RD_GLSL" in env["BUILDERS"]:
env.RD_GLSL("canvas.glsl") # find all include files
env.RD_GLSL("canvas_occlusion.glsl") gl_include_files = [str(f) for f in Glob("*_inc.glsl")]
env.RD_GLSL("canvas_sdf.glsl")
env.RD_GLSL("copy.glsl") # find all shader code(all glsl files excluding our include files)
env.RD_GLSL("copy_to_fb.glsl") glsl_files = [str(f) for f in Glob("*.glsl") if str(f) not in gl_include_files]
env.RD_GLSL("cubemap_roughness.glsl")
env.RD_GLSL("cubemap_downsampler.glsl") # make sure we recompile shaders if include files change
env.RD_GLSL("cubemap_filter.glsl") env.Depends([f + ".gen.h" for f in glsl_files], gl_include_files)
env.RD_GLSL("scene_forward_clustered.glsl")
env.RD_GLSL("sky.glsl") # compile shaders
env.RD_GLSL("tonemap.glsl") for glsl_file in glsl_files:
env.RD_GLSL("cube_to_dp.glsl") env.RD_GLSL(glsl_file)
env.RD_GLSL("giprobe.glsl")
env.RD_GLSL("giprobe_debug.glsl")
env.RD_GLSL("giprobe_sdf.glsl")
env.RD_GLSL("luminance_reduce.glsl")
env.RD_GLSL("bokeh_dof.glsl")
env.RD_GLSL("ssao.glsl")
env.RD_GLSL("ssao_downsample.glsl")
env.RD_GLSL("ssao_importance_map.glsl")
env.RD_GLSL("ssao_blur.glsl")
env.RD_GLSL("ssao_interleave.glsl")
env.RD_GLSL("roughness_limiter.glsl")
env.RD_GLSL("screen_space_reflection.glsl")
env.RD_GLSL("screen_space_reflection_filter.glsl")
env.RD_GLSL("screen_space_reflection_scale.glsl")
env.RD_GLSL("subsurface_scattering.glsl")
env.RD_GLSL("specular_merge.glsl")
env.RD_GLSL("gi.glsl")
env.RD_GLSL("resolve.glsl")
env.RD_GLSL("sdfgi_preprocess.glsl")
env.RD_GLSL("sdfgi_integrate.glsl")
env.RD_GLSL("sdfgi_direct_light.glsl")
env.RD_GLSL("sdfgi_debug.glsl")
env.RD_GLSL("sdfgi_debug_probes.glsl")
env.RD_GLSL("volumetric_fog.glsl")
env.RD_GLSL("particles.glsl")
env.RD_GLSL("particles_copy.glsl")
env.RD_GLSL("sort.glsl")
env.RD_GLSL("skeleton.glsl")
env.RD_GLSL("cluster_render.glsl")
env.RD_GLSL("cluster_store.glsl")
env.RD_GLSL("cluster_debug.glsl")