homogeneous clip coordinates

Points within the perspective (or orthographic) frustum are transformed by the projection
matrix to the (homogeneous) space that is contained within a cube centered
at the origin, with side length of 2. This space is called the canonical
viewing volume. The term "homogeneous" means that these coordinates
should not necessarily be considered to be true Cartesian positions until they

are divided by their fourth coordinate.


The x and y components of the position in clip coordinates are roughly what we need to
access the shadow map. The z coordinate contains the depth information that we can use to
compare with the shadow map. However, before we can use these values we need to do two
things. First, we need to bias them so that they range from zero to one (instead of -1 to 1), and
second, we need to apply perspective division (more on this later).


In clip coordinates (after perspective division) the z coordinate ranges from
-1 to 1. It is the viewport transformation that (among other things) converts
the depth to a range between zero and one. Incidentally, if so desired, we can
configure the viewport transformation to use some other range for the depth
values (say between 0 and 100) via the function glDepthRange.


简单来说就是经过透视变化后各个坐标除以w,在(-1,-1,-1)到(1,1,1)的Cube里。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值