I****write a postProcessStages shader. I need to calculate Cartesian3 by gl_FragCoord.xy and depth. What should I do?
var fragmentShaderSource =
`
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
void main(void)
{
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
// what should I do ?
vec3 cartesian3 = getCartesian3(gl_FragCoord.x, gl_FragCoord.y, depth);
…
}
`