aboutsummaryrefslogtreecommitdiff
path: root/stockton-passes/src/data/3d.frag
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commit6ab13f2d0cb345795f761181a06777ade61ff09c (patch)
tree42007acef9846d5e79f1bf418a96647f34b530d1 /stockton-passes/src/data/3d.frag
parentccf0074b08ce835cf22e7d46153d1cb3f3d06d32 (diff)
refactor(all): separate rendering from framework
stockton-passes is mostly just a stand-in until this is properly separated
Diffstat (limited to 'stockton-passes/src/data/3d.frag')
-rw-r--r--stockton-passes/src/data/3d.frag15
1 files changed, 15 insertions, 0 deletions
diff --git a/stockton-passes/src/data/3d.frag b/stockton-passes/src/data/3d.frag
new file mode 100644
index 0000000..336d9fe
--- /dev/null
+++ b/stockton-passes/src/data/3d.frag
@@ -0,0 +1,15 @@
+#version 450
+
+// DescriptorSet 0 = Textures
+layout(set = 0, binding = 0) uniform texture2D tex[8];
+layout(set = 0, binding = 1) uniform sampler samp[8];
+
+layout (location = 1) in vec2 frag_uv;
+layout (location = 2) in flat int frag_tex;
+
+layout (location = 0) out vec4 color;
+
+void main()
+{
+ color = texture(sampler2D(tex[frag_tex % 8], samp[frag_tex % 8]), frag_uv);
+} \ No newline at end of file