summaryrefslogtreecommitdiff
path: root/gfx/gl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-12 01:25:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-12 01:25:37 +0000
commite4ae52e8891364652a8e8247f82d23b5e1aca7fc (patch)
tree1afc6a4a5f8e356d038c407ece6a90d96d18599e /gfx/gl
parentFix issue with normal affecting transparency (diff)
downloadilt-e4ae52e8891364652a8e8247f82d23b5e1aca7fc.tar.bz2
ilt-e4ae52e8891364652a8e8247f82d23b5e1aca7fc.tar.xz
ilt-e4ae52e8891364652a8e8247f82d23b5e1aca7fc.zip
Update glsl version and interface
Diffstat (limited to 'gfx/gl')
-rw-r--r--gfx/gl/shaders/basicShader.fs8
-rw-r--r--gfx/gl/shaders/basicShader.vs12
2 files changed, 10 insertions, 10 deletions
diff --git a/gfx/gl/shaders/basicShader.fs b/gfx/gl/shaders/basicShader.fs
index 35d3ec3..7d79575 100644
--- a/gfx/gl/shaders/basicShader.fs
+++ b/gfx/gl/shaders/basicShader.fs
@@ -1,13 +1,13 @@
-#version 120
+#version 130
-varying vec2 texCoord0;
-varying vec3 normal0;
+in vec2 texCoord0;
+in vec3 normal0;
uniform sampler2D sampler;
uniform vec3 lightDirection;
void main()
{
- gl_FragColor = texture2D(sampler, texCoord0);
+ gl_FragColor = texture(sampler, texCoord0);
gl_FragColor.xyz *= clamp(dot(-lightDirection, normal0), 0.0, 1.0);
}
diff --git a/gfx/gl/shaders/basicShader.vs b/gfx/gl/shaders/basicShader.vs
index e697315..406edc4 100644
--- a/gfx/gl/shaders/basicShader.vs
+++ b/gfx/gl/shaders/basicShader.vs
@@ -1,11 +1,11 @@
-#version 120
+#version 130
-attribute vec3 position;
-attribute vec2 texCoord;
-attribute vec3 normal;
+in vec3 position;
+in vec2 texCoord;
+in vec3 normal;
-varying vec2 texCoord0;
-varying vec3 normal0;
+out vec2 texCoord0;
+out vec3 normal0;
uniform mat4 viewProjection;
uniform mat4 model;