summaryrefslogtreecommitdiffstats
path: root/shaders/triangle.frag
diff options
context:
space:
mode:
Diffstat (limited to '')
-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