SCsub 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. if "GLES3_GLSL" in env["BUILDERS"]:
  5. # find all include files
  6. gl_include_files = [str(f) for f in Glob("*_inc.glsl")]
  7. # find all shader code(all glsl files excluding our include files)
  8. glsl_files = [str(f) for f in Glob("*.glsl") if str(f) not in gl_include_files]
  9. # make sure we recompile shaders if include files change
  10. env.Depends([f + ".gen.h" for f in glsl_files], gl_include_files + ["#gles3_builders.py"])
  11. # compile shaders
  12. # as we have a few, not yet, converted files we name the ones we want to include:
  13. env.GLES3_GLSL("canvas.glsl")
  14. env.GLES3_GLSL("feed.glsl")
  15. env.GLES3_GLSL("scene.glsl")
  16. env.GLES3_GLSL("sky.glsl")
  17. env.GLES3_GLSL("canvas_occlusion.glsl")
  18. env.GLES3_GLSL("canvas_sdf.glsl")
  19. env.GLES3_GLSL("particles.glsl")
  20. env.GLES3_GLSL("particles_copy.glsl")
  21. env.GLES3_GLSL("skeleton.glsl")
  22. # once we finish conversion we can introduce this to cover all files:
  23. # for glsl_file in glsl_files:
  24. # env.GLES3_GLSL(glsl_file)
  25. SConscript("effects/SCsub")