I'm converting view coordinates to texture coordinates for both my shadow maps and Screen space reflections. I keep seeing this conversion in examples:
var T = new Matrix
{
M11 = 0.5f,
M22 = -0.5f,
M33 = 1.0f,
M41 = 0.5f,
M42 = 0.5f,
M44 = 1.0f
};
Matrix m = view * projection * T;
What is T and why does this "work"? I'm saying "work" because I not satisfied with the result but the problem may not lie here.
I would like to use and inverted view and projection and then adjust the coordinates from -1,1 to 0,1. But that doesn't work at all. What have I misunderstood?