summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/gl3/normaldiffusemap.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/shaders/gl3/normaldiffusemap.frag')
-rw-r--r--src/extras/shaders/gl3/normaldiffusemap.frag36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/extras/shaders/gl3/normaldiffusemap.frag b/src/extras/shaders/gl3/normaldiffusemap.frag
deleted file mode 100644
index bac776738..000000000
--- a/src/extras/shaders/gl3/normaldiffusemap.frag
+++ /dev/null
@@ -1,36 +0,0 @@
-#version 150 core
-
-in vec3 worldPosition;
-in vec3 worldNormal;
-in vec4 worldTangent;
-in vec2 texCoord;
-
-uniform sampler2D diffuseTexture;
-uniform sampler2D normalTexture;
-
-// TODO: Replace with a struct
-uniform vec4 ka; // Ambient reflectivity
-uniform vec4 ks; // Specular reflectivity
-uniform float shininess; // Specular shininess factor
-
-uniform vec3 eyePosition;
-
-out vec4 fragColor;
-
-#pragma include phong.inc.frag
-#pragma include coordinatesystems.inc
-
-void main()
-{
- // Sample the textures at the interpolated texCoords
- vec4 diffuseTextureColor = texture( diffuseTexture, texCoord );
- vec3 tNormal = 2.0 * texture( normalTexture, texCoord ).rgb - vec3( 1.0 );
-
- mat3 tangentMatrix = calcWorldSpaceToTangentSpaceMatrix(worldNormal, worldTangent);
- mat3 invertTangentMatrix = transpose(tangentMatrix);
-
- vec3 wNormal = normalize(invertTangentMatrix * tNormal);
-
- vec3 worldView = normalize(eyePosition - worldPosition);
- fragColor = phongFunction(ka, diffuseTextureColor, ks, shininess, worldPosition, worldView, wNormal);
-}