summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-19 00:23:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-20 15:08:43 +0000
commitc7af64b7061c59c987958d0830838f1c05caeb29 (patch)
tree8195696b2130eb6a2674c075416b15a352440b61 /gfx/gl/shaders
parentCopy render vital link data to vertex buffer (diff)
downloadilt-c7af64b7061c59c987958d0830838f1c05caeb29.tar.bz2
ilt-c7af64b7061c59c987958d0830838f1c05caeb29.tar.xz
ilt-c7af64b7061c59c987958d0830838f1c05caeb29.zip
Render rail network using new shaders
Non-functional, totally unimplemented at this stage
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r--gfx/gl/shaders/network.fs6
-rw-r--r--gfx/gl/shaders/networkCurve.gs9
-rw-r--r--gfx/gl/shaders/networkCurve.vs20
-rw-r--r--gfx/gl/shaders/networkStraight.gs15
-rw-r--r--gfx/gl/shaders/networkStraight.vs20
5 files changed, 70 insertions, 0 deletions
diff --git a/gfx/gl/shaders/network.fs b/gfx/gl/shaders/network.fs
new file mode 100644
index 0000000..d427da2
--- /dev/null
+++ b/gfx/gl/shaders/network.fs
@@ -0,0 +1,6 @@
+#version 330 core
+
+void
+main()
+{
+}
diff --git a/gfx/gl/shaders/networkCurve.gs b/gfx/gl/shaders/networkCurve.gs
new file mode 100644
index 0000000..cf70b6e
--- /dev/null
+++ b/gfx/gl/shaders/networkCurve.gs
@@ -0,0 +1,9 @@
+#version 330 core
+
+layout(points) in;
+layout(triangle_strip, max_vertices = 255) out;
+
+void
+main()
+{
+}
diff --git a/gfx/gl/shaders/networkCurve.vs b/gfx/gl/shaders/networkCurve.vs
new file mode 100644
index 0000000..b4324d6
--- /dev/null
+++ b/gfx/gl/shaders/networkCurve.vs
@@ -0,0 +1,20 @@
+#version 330 core
+
+layout(location = 0) in ivec3 v_apos;
+layout(location = 1) in ivec3 v_bpos;
+layout(location = 2) in ivec3 v_centre;
+layout(location = 3) in float v_reps;
+
+uniform mat4 viewProjection;
+
+flat out ivec3 apos;
+flat out ivec3 bpos;
+flat out mat2 rot;
+flat out float reps;
+flat out float dist;
+
+void
+main()
+{
+ dist = viewProjection[0][0];
+}
diff --git a/gfx/gl/shaders/networkStraight.gs b/gfx/gl/shaders/networkStraight.gs
new file mode 100644
index 0000000..c2bfe3f
--- /dev/null
+++ b/gfx/gl/shaders/networkStraight.gs
@@ -0,0 +1,15 @@
+#version 330 core
+
+flat in ivec3 apos[];
+flat in ivec3 bpos[];
+flat in mat2 rot[];
+flat in float reps[];
+flat in float dist[];
+
+layout(points) in;
+layout(triangle_strip, max_vertices = 20) out;
+
+void
+main()
+{
+}
diff --git a/gfx/gl/shaders/networkStraight.vs b/gfx/gl/shaders/networkStraight.vs
new file mode 100644
index 0000000..025ae8f
--- /dev/null
+++ b/gfx/gl/shaders/networkStraight.vs
@@ -0,0 +1,20 @@
+#version 330 core
+
+layout(location = 0) in ivec3 v_apos;
+layout(location = 1) in ivec3 v_bpos;
+layout(location = 2) in mat2 v_rot;
+layout(location = 4) in float v_reps;
+
+uniform mat4 viewProjection;
+
+flat out ivec3 apos;
+flat out ivec3 bpos;
+flat out mat2 rot;
+flat out float reps;
+flat out float dist;
+
+void
+main()
+{
+ dist = viewProjection[0][0];
+}