#version 400

out vec4 fragColor;

// uniform sampler2D shadowMap;
uniform mat4 lightTransform;

// uniform sampler2D depth;
uniform sampler2D position;
// uniform sampler2D albedo;
uniform sampler2D normals;

in vec2 vTexCoord;

uniform vec3 cameraPosition;
uniform vec3 cameraVector;

const vec3 lightVector = vec3(0.0, -1.0, 0.0);
const vec3 lightPosition = vec3(0.0, -500.0, 1000.0);
const vec3 ambientLight = vec3(0.3, 0.3, 0.3);
const vec3 diffuseLight = vec3(0.3, 0.3, 0.3);
const vec3 sunLight = vec3(0.6, 0.6, 0.6);

void main(void) {
  // vec3 albedo = texture(albedo, vTexCoord).xyz;
  vec3 position = texture(position, vTexCoord).xyz;
  vec3 normal = texture(normals, vTexCoord).xyz * 2.0 - 1.0;
  // float depth = max(0.2, texture(depth, vTexCoord).r);
  // float shadowDepth = texture(shadowMap, vTexCoord).r;

  vec4 lightPos = lightTransform * vec4(position, 1.0);

  // SSAO idea
  // use hemisphere kernel for shadow level
  // use flipped hemisphere kernel for light boost

  fragColor = vec4(0.0, 0.0, 0.0, 0.5);
}
