Updated deferred shadows example to use new framebuffer class

This commit is contained in:
saschawillems 2016-07-16 23:27:39 +02:00
parent 47bd9d62e2
commit f3a86c292c
12 changed files with 156 additions and 458 deletions

View file

@ -33,7 +33,7 @@ void main()
highp int index = int(inUV.z);
if (index == 2)
{
float depth = texture(samplerDepth, vec3(inUV.st, 0.0)).r;
float depth = texture(samplerDepth, vec3(inUV.st, 2.0)).r;
outFragColor = vec4(vec3(1.0-LinearizeDepth(depth)), 1.0);
}
else

View file

@ -16,7 +16,7 @@ layout (location = 0) out vec4 outFragColor;
#define LIGHT_COUNT 3
#define SHADOW_FACTOR 0.25
#define AMBIENT_LIGHT 0.0
#define AMBIENT_LIGHT 0.1
#define USE_PCF
struct Light

View file

@ -22,7 +22,6 @@ void main()
// Calculate normal in tangent space
vec3 N = normalize(inNormal);
N.y = -N.y;
vec3 T = normalize(inTangent);
vec3 B = cross(N, T);
mat3 TBN = mat3(T, B, N);