From 8ad1cf1b89b8acae55e36d6bd4562dffd1bcc714 Mon Sep 17 00:00:00 2001 From: papush! Date: Sat, 2 Jan 2021 17:45:42 +0100 Subject: target openglES 2 (with vao ext) --- shaders/main.frag | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'shaders/main.frag') 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); } -- cgit v1.2.3-70-g09d2