#version 330 core

in vec4 fPosition;
out vec4 outColor;

void main(void) {
	float depth = gl_FragCoord.z;
	float moment1 = depth ;
	float moment2 = depth * depth;
	
	float dx = dFdx(depth);
	float dy = dFdy(depth);
	moment2 += 0.25 * (dx*dx + dy*dy) ;

	outColor = vec4(moment1, moment2, 0, 0);	
}

