summaryrefslogtreecommitdiffstats
path: root/shaders/triangle.frag
diff options
context:
space:
mode:
authorClement Sibille <clements@lisible.xyz>2025-05-05 08:32:33 +0200
committerClement Sibille <clements@lisible.xyz>2025-05-05 12:24:27 +0200
commitb71eac2069a30349435c192d682e865718c86a15 (patch)
tree33754245a23533e31e6a83390bf190c11dfe2bb9 /shaders/triangle.frag
parent6017db0069977ae85e698a1234f4a2b7632ee495 (diff)
Add a vulkan renderer that renders an OBJ
Diffstat (limited to 'shaders/triangle.frag')
-rw-r--r--shaders/triangle.frag5
1 files changed, 4 insertions, 1 deletions
diff --git a/shaders/triangle.frag b/shaders/triangle.frag
index 7c5b0e7..c7d99f3 100644
--- a/shaders/triangle.frag
+++ b/shaders/triangle.frag
@@ -1,9 +1,12 @@
#version 450
layout(location = 0) in vec3 fragColor;
+layout(location = 1) in vec2 fragTextureCoordinates;
layout(location = 0) out vec4 outColor;
+layout(binding = 1) uniform sampler2D textureSampler;
+
void main() {
- outColor = vec4(fragColor, 1.0);
+ outColor = vec4(fragColor * texture(textureSampler, fragTextureCoordinates).rgb, 1.0);
}
Go back to lisible.xyz