ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/material.C
(Generate patch)

Comparing libgender/material.C (file contents):
Revision 1.50 by root, Sun Nov 7 22:40:58 2004 UTC vs.
Revision 1.51 by root, Fri Nov 26 03:48:40 2004 UTC

92 92
93 temp_1f lz; 93 temp_1f lz;
94 94
95 // TODO: negative z is not calculated in an acceptable way, clipping does horrible things(?) 95 // TODO: negative z is not calculated in an acceptable way, clipping does horrible things(?)
96 lz = z (vout.position); 96 lz = z (vout.position);
97 z (vout.position) = (ifelse ( 97 z (vout.position) = clamp (
98 lz < 0, 98 ifelse (lz <= 0,
99 lz, 99 lz,
100 log (lz) * (2 / log (1e10)) 100 log (lz + 1) * (2 / log (1e10))
101 ) - 1,
102 -1.F, +1.F
101 ) - 1) * w (vout.position); 103 ) * w (vout.position);
102 } 104 }
103 105
104 vsh_src = shader::shader_builder::stop (); 106 vsh_src = shader::shader_builder::stop ();
105 107
106 shader::shader_builder::start (); 108 shader::shader_builder::start ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines