From 400410fcd436d5e4310bfa779f0309c5fae5b2c2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 16 Jan 2021 18:09:15 +0000 Subject: Initial commit Stripped back and formatted from https://github.com/BennyQBD/ModernOpenGLTutorial/ --- res/basicShader.fs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 res/basicShader.fs (limited to 'res/basicShader.fs') diff --git a/res/basicShader.fs b/res/basicShader.fs new file mode 100644 index 0000000..3aa974f --- /dev/null +++ b/res/basicShader.fs @@ -0,0 +1,13 @@ +#version 120 + +varying vec2 texCoord0; +varying vec3 normal0; + +uniform sampler2D sampler; +uniform vec3 lightDirection; + +void main() +{ + gl_FragColor = texture2D(sampler, texCoord0) * + clamp(dot(-lightDirection, normal0), 0.0, 1.0); +} -- cgit v1.2.3