NGL  6.5
The NCCA Graphics Library
DiffuseShaders.h File Reference
#include <string>
+ Include dependency graph for DiffuseShaders.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


const std::string diffuseVertexShader
const std::string diffuseFragmentShader

Variable Documentation

const std::string diffuseFragmentShader
Initial value:
#version 150
in vec3 fragmentNormal;
out vec4 fragColour;
uniform vec4 Colour;
uniform vec3 lightPos;
uniform vec4 lightDiffuse;
void main ()
fragColour= vec4(0.);
vec3 N = normalize(fragmentNormal);
vec3 L = normalize(lightPos);
fragColour += Colour*lightDiffuse *dot(L, N);

Definition at line 21 of file DiffuseShaders.h.

const std::string diffuseVertexShader
Initial value:
#version 150
out vec3 fragmentNormal;
in vec3 inVert;
in vec3 inNormal;
uniform mat4 MVP;
uniform mat3 normalMatrix;
void main()
fragmentNormal = (normalMatrix*inNormal);
gl_Position = MVP*vec4(inVert,1.0);

Definition at line 6 of file DiffuseShaders.h.