Updated deferred shadows example to use new framebuffer class
This commit is contained in:
parent
47bd9d62e2
commit
f3a86c292c
12 changed files with 156 additions and 458 deletions
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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);
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue