   projCoords.xy = projCoords.xy * 0.5 + 0.5;
 
   return projCoords.xy;
-}
+}*/
 
 vec2 recoverHitCoords(vec3 dir, vec3 hitCoords) {
   vec4 projCoords;

}

void main() {
  vec3 viewNormal = normalize((uniInvViewMatrix * texture(uniSceneNormalBuffer, fragTexcoords)).rgb);

  float depth = texture(uniSceneDepthBuffer, fragTexcoords).r;
  vec3 projPos = vec3(fragTexcoords.x * 2.0 - 1.0, (1.0 - fragTexcoords.y) * 2.0 - 1.0, depth);
  vec4 viewPos = uniInvProjMatrix * vec4(projPos, 1.0);
  viewPos /= viewPos.w;
  vec3 worldPos = (uniInvViewMatrix * viewPos).xyz;

  vec3 jittering = mix(vec3(0.0), vec3(hash(worldPos)), 1.0);

  vec3 reflectDir = reflect(normalize(viewPos.xyz), viewNormal);
  vec3 reflectColor = texture(uniSceneColorBuffer, recoverHitCoords(reflectDir * max(0.1, -viewPos.z), viewPos.xyz)).rgb;

  fragColor = vec4(/*reflectColor + */texture(uniSceneColorBuffer, fragTexcoords).rgb, 1.0);
}

uniform mat4 uniInvProjMatrix;
uniform mat4 uniViewMatrix;
uniform mat4 uniInvViewMatrix;

uniform sampler2D uniSceneDepthBuffer;
uniform sampler2D uniSceneColorBuffer;
