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

Comparing libgender/material.C (file contents):
Revision 1.48 by root, Sun Nov 7 03:28:20 2004 UTC vs.
Revision 1.49 by root, Sun Nov 7 22:07:05 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 95 // TODO: negative z is not calculated in an acceptable way
96 lz = z (vout.position); 96 lz = z (vout.position);
97 z (vout.position) = (log2 (lz) * (2 / log2 (1e10)) - 1) * w (vout.position); 97 z (vout.position) = (ifelse (lz < 0, lz, log (lz) * (2 / log (1e10))) - 1) * w (vout.position);
98#if 0
99 z (vout.position) =
100 ifelse (
101 z < 0,
102 -1,
103 log2 (lz) * (2 / log2 (1e10)) - 1
104 ) * w (vout.position);
105#endif
106 } 98 }
107 99
108 vsh_src = shader::shader_builder::stop (); 100 vsh_src = shader::shader_builder::stop ();
109 101
110 shader::shader_builder::start (); 102 shader::shader_builder::start ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines