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

Comparing cvsroot/libgender/material.C (file contents):
Revision 1.53 by root, Fri Dec 10 05:37:09 2004 UTC vs.
Revision 1.54 by root, Sat Dec 11 00:17:28 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#if 0
98 lz = (log (max (lz, 0) + 1) / log (1e18)) - 1;
99#else
97 lz = ifelse (lz <= 0, 100 lz = ifelse (lz <= 0,
98 0, 101 0,
99 log (lz + 1) / log (1e18) 102 log (lz + 1) / log (1e18)
100 ) - 1; 103 ) - 1;
104#endif
101 z (vout.position) = lz * w (vout.position); 105 z (vout.position) = lz * w (vout.position);
102 } 106 }
103 107
104 vsh_src = shader::shader_builder::stop (); 108 vsh_src = shader::shader_builder::stop ();
105 109

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines