texture filtering problem

in the orange book , it says that the fellowing code using sixteen samples per fragment to generate antialiased edges,but i do not understand why sixteen samples. the code just choose the those (-1,-1)(1,1)(1,-1)(-1,1) for samples ,why sixteen? the type of the return value of textureProjOffset is gvec4,but the type of sum is float ,why?
float sum;

It assumes that the shadow map is linearly filtered, so each texture access itself uses 4 samples to compute its value. 4 * 4 = 16.

The return type of texel fetch function depends on the sampler type used. It is float when using a shadow sampler type.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.