Light space coordinates Shadow mapping



visualization of depth map projected onto scene


in order test point against depth map, position in scene coordinates must transformed equivalent position seen light. accomplished matrix multiplication. location of object on screen determined usual coordinate transformation, second set of coordinates must generated locate object in light space.


the matrix used transform world coordinates light s viewing coordinates same 1 used render shadow map in first step (under opengl product of modelview , projection matrices). produce set of homogeneous coordinates need perspective division (see 3d projection) become normalized device coordinates, in each component (x, y, or z) falls between −1 , 1 (if visible light view). many implementations (such opengl , direct3d) require additional scale , bias matrix multiplication map −1 1 values 0 1, more usual coordinates depth map (texture map) lookup. scaling can done before perspective division, , folded previous transformation calculation multiplying matrix following:








[



0.5


0


0


0.5




0


0.5


0


0.5




0


0


0.5


0.5




0


0


0


1



]




{\displaystyle {\begin{bmatrix}0.5&0&0&0.5\\0&0.5&0&0.5\\0&0&0.5&0.5\\0&0&0&1\end{bmatrix}}}


if done shader, or other graphics hardware extension, transformation applied @ vertex level, , generated value interpolated between other vertices, , passed fragment level.







Comments

Popular posts from this blog

Discography Kassav'

History New York State Route 133

History Women in science