aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/data.h9
-rw-r--r--shaders/main/frag.glsl9
-rw-r--r--shaders/main/vert.glsl9
3 files changed, 10 insertions, 17 deletions
diff --git a/shaders/data.h b/shaders/data.h
index a2d5625..16174b9 100644
--- a/shaders/data.h
+++ b/shaders/data.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
+ * Copyright (C) 2018, 2022 Tomasz Kramkowski <tk@the-tk.com>
* SPDX-License-Identifier: MIT
*/
#ifdef SH_PROG
@@ -16,6 +16,13 @@
SH_IN(vec2, uv)
#undef SH_IN
#endif // SH_IN
+#ifdef SH_IF
+ SH_IF(vec3, norm)
+ SH_IF(vec3, pos)
+ SH_IF(vec2, uv)
+ SH_IF(vec3, lipos)
+#undef SH_IF
+#endif // SH_IF
#ifdef SH_UNI
SH_UNI(mat4, model)
SH_UNI(mat4, view)
diff --git a/shaders/main/frag.glsl b/shaders/main/frag.glsl
index f6ed7c3..9f8c5de 100644
--- a/shaders/main/frag.glsl
+++ b/shaders/main/frag.glsl
@@ -1,14 +1,7 @@
/*
- * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
+ * Copyright (C) 2018, 2022 Tomasz Kramkowski <tk@the-tk.com>
* SPDX-License-Identifier: MIT
*/
-in iface {
- vec3 norm;
- vec3 pos;
- vec2 uv;
- vec3 lipos;
-} i;
-
void main()
{
vec3 fdiff = vec3(texture(tdiff, i.uv));
diff --git a/shaders/main/vert.glsl b/shaders/main/vert.glsl
index 3b145e3..39bfc1b 100644
--- a/shaders/main/vert.glsl
+++ b/shaders/main/vert.glsl
@@ -1,14 +1,7 @@
/*
- * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
+ * Copyright (C) 2018, 2022 Tomasz Kramkowski <tk@the-tk.com>
* SPDX-License-Identifier: MIT
*/
-out iface {
- vec3 norm;
- vec3 pos;
- vec2 uv;
- vec3 lipos;
-} o;
-
void main()
{
gl_Position = proj * view * model * vec4(pos, 1.0);