From b71eac2069a30349435c192d682e865718c86a15 Mon Sep 17 00:00:00 2001 From: Clement Sibille Date: Mon, 5 May 2025 08:32:33 +0200 Subject: Add a vulkan renderer that renders an OBJ --- shaders/triangle.frag | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shaders/triangle.frag') 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); } -- cgit v1.2.3