From: Seth G. <sga...@li...> - 2002-01-04 19:19:16
|
I've got the high precision model rendering working in software, but only by not using the special case functions for non-clipped models. These are supposed to be more optimal because the transformation matrix is scaled down by "1/2**32": // do the scaling up of x and y to screen coordinates as part of the transform // for the unclipped case (it would mess up clipping in the clipped case). // Also scale down z, so 1/z is scaled 31 bits for free, and scale down x and y // correspondingly so the projected x and y come out right // FIXME: make this work for clipped case too? if (trivial_accept) { for (i = 0; i < 4; i++) { aliastransform[0][i] *= aliasxscale * (1.0 / ((float) 0x8000 * 0x10000)); aliastransform[1][i] *= aliasyscale * (1.0 / ((float) 0x8000 * 0x10000)); aliastransform[2][i] *= 1.0 / ((float) 0x8000 * 0x10000); } } I see three options: * Drop this optimization * Implement this optimization in the other functions * Implement this optimization for both cases (as the FIXME suggests) I couldn't figure out how to do either of the second two options __ __ _ _ __ __ _/ \__/ \__/ Seth Galbraith "The Serpent Lord" \__/ \__/ \_ \__/ \__/ \_ sga...@kr... #2244199 on ICQ _/ \__/ \__/ _/ \__/ \__/ http://www.planetquake.com/gg \__/ \__/ \_ |