Shaders.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #include "client/rendering/Shaders.h"
  2. Error Shaders::init() {
  3. Error error = world.compile("resources/shader/world.vs", nullptr,
  4. "resources/shader/world.fs");
  5. if(error.has()) {
  6. return error;
  7. }
  8. error = ssao.compile("resources/shader/ssao.vs", nullptr,
  9. "resources/shader/ssao.fs");
  10. if(error.has()) {
  11. return error;
  12. }
  13. error = ssaoBlur.compile("resources/shader/ssaoBlur.vs", nullptr,
  14. "resources/shader/ssaoBlur.fs");
  15. if(error.has()) {
  16. return error;
  17. }
  18. error = shadow.compile("resources/shader/worldShadow.vs", nullptr,
  19. "resources/shader/worldShadow.fs");
  20. if(error.has()) {
  21. return error;
  22. }
  23. error = postWorld.compile("resources/shader/worldPost.vs", nullptr,
  24. "resources/shader/worldPost.fs");
  25. if(error.has()) {
  26. return error;
  27. }
  28. return overlay.compile("resources/shader/overlay.vs", nullptr,
  29. "resources/shader/overlay.fs");
  30. }