diff options
Diffstat (limited to 'shaders/main.frag')
-rw-r--r-- | shaders/main.frag | 12 |
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); } |