aboutsummaryrefslogtreecommitdiff
path: root/shaders/main.frag
diff options
context:
space:
mode:
authorpapush!2021-01-02 17:45:42 +0100
committerpapush!2021-01-02 17:45:42 +0100
commit8ad1cf1b89b8acae55e36d6bd4562dffd1bcc714 (patch)
tree02c4a50e19670489a63cd80f1ca1040a2f2cb0ab /shaders/main.frag
parentdafdc38f1631f43d94803b0711657187ab58dedd (diff)
target openglES 2 (with vao ext)
Diffstat (limited to 'shaders/main.frag')
-rw-r--r--shaders/main.frag12
1 files changed, 4 insertions, 8 deletions
diff --git a/shaders/main.frag b/shaders/main.frag
index 8eb47ec..7120521 100644
--- a/shaders/main.frag
+++ b/shaders/main.frag
@@ -1,10 +1,6 @@
-#version 330 core
-
-in vec3 norm;
-in vec2 uv;
-in vec3 frag_pos;
-
-out vec4 final_col;
+varying vec3 norm;
+varying vec2 uv;
+varying vec3 frag_pos;
uniform sampler2D tex;
@@ -16,5 +12,5 @@ void main() {
float diff = max(dot(normalize(norm), light_dir), 0.0);
vec3 diffuse = diff * light_col;
- final_col = texture(tex, uv) * vec4(ambient + diffuse, 1);
+ gl_FragColor = texture2D(tex, uv) * vec4(ambient + diffuse, 1);
}