Search
lxdream.org :: lxdream/src/pvr2/scene.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/scene.c
changeset 648:ef9aa5cba86f
prev645:a7392098299c
next1066:ddffe9d2b332
author nkeynes
date Sat Mar 08 04:21:42 2008 +0000 (12 years ago)
branchlxdream-render
permissions -rw-r--r--
last change Put the 1/z back in for the moment
file annotate diff log raw
1.1 --- a/src/pvr2/scene.c Thu Mar 06 08:22:00 2008 +0000
1.2 +++ b/src/pvr2/scene.c Sat Mar 08 04:21:42 2008 +0000
1.3 @@ -45,10 +45,6 @@
1.4 float f;
1.5 uint32_t i;
1.6 } temp;
1.7 - /* int e = ((half & 0x7C00) >> 10) - 15 + 127;
1.8 -
1.9 - temp.i = ((half & 0x8000) << 16) | (e << 23) |
1.10 - ((half & 0x03FF) << 13); */
1.11 temp.i = ((uint32_t)half)<<16;
1.12 return temp.f;
1.13 }
1.14 @@ -211,6 +207,8 @@
1.15 float z = *data.fval++;
1.16 if( !isfinite(z) ) {
1.17 z = 0;
1.18 + } else if( z != 0 ) {
1.19 + z = 1/z;
1.20 }
1.21 if( z > pvr2_scene.bounds[5] ) {
1.22 pvr2_scene.bounds[5] = z;
.