After you multiply the InPos data with matWorldViewProj, the result (OutPos) will have the distance to the screen in its z-component (I think the w-component is some distance related information, too, maybe it is scaled (non-linearly) compared to z, I don't know).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends