From 7c1edef3ac501d40e3de495b9434df71f535e9bc Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 19 Oct 2018 23:22:07 +0300 Subject: Allow multiple shaders while reducing duplication This change also stops using bie as eventually it will be replaced with a more sophisticated asset handling system which will also allow custom shaders. --- shaders/data.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 shaders/data.h (limited to 'shaders/data.h') diff --git a/shaders/data.h b/shaders/data.h new file mode 100644 index 0000000..e1a71c3 --- /dev/null +++ b/shaders/data.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski + * SPDX-License-Identifier: MIT + */ +#ifdef SH_PROG + SH_PROG(main) +#undef SH_PROG +#endif // SH_PROG +#ifdef SH_VER + SH_VER("330 core") +#undef SH_VER +#endif // SH_VER +#ifdef SH_IN + SH_IN(vec3, pos) + SH_IN(vec3, norm) + SH_IN(vec2, uv) +#undef SH_IN +#endif // SH_IN +#ifdef SH_UNI + SH_UNI(mat4, model) + SH_UNI(mat4, view) + SH_UNI(mat4, proj) + SH_UNI(vec3, light) +#undef SH_UNI +#endif // SH_UNI +#ifdef SH_TEX + SH_TEX(2D, tex) +#undef SH_TEX +#endif // SH_TEX +#ifdef SH_OUT + SH_OUT(vec4, color) +#undef SH_OUT +#endif // SH_OUT -- cgit v1.2.3-54-g00ecf