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

Comparing libgender/material.C (file contents):
Revision 1.63 by root, Mon Jul 18 01:40:01 2005 UTC vs.
Revision 1.64 by root, Mon Jul 18 04:28:40 2005 UTC

89 { 89 {
90 using namespace shader::compile; 90 using namespace shader::compile;
91 91
92 temp_1f lz; 92 temp_1f lz;
93 93
94 // TODO: negative z is not calculated in an acceptable way, clipping does horrible things(?) 94 // TODO: negative z is not calculated in an a very acceptable way
95 lz = z (vout.position); 95 lz = z (vout.position);
96#if 0 96 lz = sign (lz) * (log (abs (lz) + exp (1e0)) - 1e0) / log (1e30);
97 lz = (log (max (lz, 0) + 1) / log (1e30)) - 1;
98#else
99 lz = ifelse (lz <= 0,
100 0,
101 log (lz + 1) / log (1e30)
102 ) - 1;
103#endif
104 z (vout.position) = lz * w (vout.position); 97 z (vout.position) = lz * w (vout.position);
105 } 98 }
106 99
107 vsh_src = shader::shader_builder::stop (); 100 vsh_src = shader::shader_builder::stop ();
108 101

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines