Sorry in advance that this question is so open-ended.
I understand most everything going on in the deferred rendering part of the chapter. Everything except the fragment shader code, when you obtain the “current sample,” which is equal to “shadowposition.z / shadowposition.w .”
How on earth is this the current sample?
I thought that the shadow position is essentially the same as the vertex position except that its being multiplied by the shadowmatrix and modelmatrix. Can anyone elaborate on the shadowposition?