How to calculate Cartesian3 in postProcessStages shader

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);



What exactly are you trying to compute? Are you trying to get the position in world space at this pixel?

Can you explain a bit more about what type of effect you’re trying to create?

Yes, I want to get the position in world space at this pixel.

Is there a way to achieve it ?