summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/lighting.frag
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-01-31 02:51:16 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-01-31 02:51:16 +0000
commitbc0958cc863083b4082161bf12456fdf28ab1c77 (patch)
treef970782f232d86325f14a36b83125791f24335af /gfx/gl/shaders/lighting.frag
parentInitial commit using tesselation shader to create curves (diff)
downloadilt-bc0958cc863083b4082161bf12456fdf28ab1c77.tar.bz2
ilt-bc0958cc863083b4082161bf12456fdf28ab1c77.tar.xz
ilt-bc0958cc863083b4082161bf12456fdf28ab1c77.zip
Rename shader source in keeping with glsl expectations
Swaps name/type of generated files to match class names and source files.
Diffstat (limited to 'gfx/gl/shaders/lighting.frag')
-rw-r--r--gfx/gl/shaders/lighting.frag17
1 files changed, 17 insertions, 0 deletions
diff --git a/gfx/gl/shaders/lighting.frag b/gfx/gl/shaders/lighting.frag
new file mode 100644
index 0000000..b5c6c8b
--- /dev/null
+++ b/gfx/gl/shaders/lighting.frag
@@ -0,0 +1,17 @@
+#version 460 core
+
+out vec3 FragColor;
+
+in vec2 TexCoords;
+
+layout(binding = 2) uniform sampler2D gAlbedoSpec;
+layout(binding = 3) uniform sampler2D gIllumination;
+
+void
+main()
+{
+ const vec3 Albedo = texture(gAlbedoSpec, TexCoords).rgb;
+ const vec3 Illumination = texture(gIllumination, TexCoords).rgb;
+
+ FragColor = Albedo * Illumination;
+}