If you're asking about converting homogeneous clip space coords to normalized device coordinates (NDC) coords, the process is: <x y z w> → <x/w y/w z/w>
This GDSE Q/A on Why is clip space always referred to as “homogeneous clip space”?Why is clip space always referred to as “homogeneous clip space”? may also be helpful to you.