Hi

I have seen some examples where when trying to convert a point in eye coordinate to normalized tecture coordinate space (between 0 and 1) from within the fragment shader , the fllowing formula is applied.

Code :

float2 texc = ((IN.Pos.xy / IN.Pos.w) + 1) / 2;

Note: IN.Pos is the modelviewprojected position.This calulation gives us the fragments screen position in the interval between [0,1]

Why is the following true?

thanks