--- cvsroot/libgender/material.C 2004/11/26 03:48:40 1.51 +++ cvsroot/libgender/material.C 2004/11/27 03:33:51 1.52 @@ -94,13 +94,11 @@ // TODO: negative z is not calculated in an acceptable way, clipping does horrible things(?) lz = z (vout.position); - z (vout.position) = clamp ( - ifelse (lz <= 0, - lz, - log (lz + 1) * (2 / log (1e10)) - ) - 1, - -1.F, +1.F - ) * w (vout.position); + lz = ifelse (lz <= 0, + lz, + log (lz + 1) / log (1e10 + 1) + ) - 1; + z (vout.position) = lz * w (vout.position); } vsh_src = shader::shader_builder::stop (); @@ -110,11 +108,11 @@ if (ctx.pass->l) { ctx.pass->l->fsh (); - fsh (ctx); } else - shader::compile::fout.frag_color = shader::compile::float4 (1., 0., 1., 1.); + // many drivers need both vertex and fragment shader, 'caboom!' otherwise + shader::compile::fout.frag_color = shader::compile::float4 (0., 0., 0., 0.); fsh_src = shader::shader_builder::stop ();