Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: mperdue@iquest.net (Mario Perdue) Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Creating a TMD on the fly Date: Sun, 15 Jun 1997 19:55:35 GMT Organization: SCEA Net Yaroze News Lines: 43 Message-ID: <33a43f53.19925512@205.149.189.29> References: <338C1E17.60C8@netcom.ca> <338CE63F.7F1E@netcom.ca> <33974F23.5973@chat.carleton.ca> <33975697.36340616@205.149.189.29> <33A40E0D.2342@chat.carleton.ca> NNTP-Posting-Host: firewall.hrtc.net X-Newsreader: Forte Free Agent 1.1/32.230 On Sun, 15 Jun 1997 11:45:17 -0400, Tim O'Neil wrote: >Actually, depending on the processor, floating point's wouldn't cause >any appreciable performance hit at all. It's true that many new processors can crank out FP math as fast (or faster) than integers. But, unfortunately, if you're going to release a game on more than one platform, you can't count on it; at least not yet. >True, they take more space than a 16-bit integer but from the information >I have seen, float adds and multiplies can be comparable to integer >operations (mind you the data I saw was for Pentium processors). I guess >it just comes down to the cost of using floating points to the cost of the >type conversions that have to happen with integers. For example, how many >instructions are generated when multiplying one of the rotational values of >the matrix (16-bit, shifted-12 integer) with one of the tranlation values >(32-bit un-shifted integer)... a few shifts and a couple of type conversions >as opposed to a single float multiply instruction. The Pentium FP performance IS pretty hot. Too bad it's been hog tied by poor operating systems. >That question aside, I would have at least liked to see the matrices be >all longs as opposed to just shorts for the 3x3 and longs for the rest. >At least that way you could represent larger numbers than just +-7 (for >scaling etc). That and you wouldn't have to worry about type >conversions and losing accuracy whenever you multiply. Not to mention >that to load an unaligned short for the playstation's processor >generates a fair number more assembler instuctions than for an aligned >one or a long (9 shorts in a matrix... almost always going to be at >least on unaligned by my reckoning). I prefer 4x4 matrices of longs myself. :^) There are a lot of things that I would have done differently had I been writing the library functions. You might not have agreed with the changes I would have made. :^) When I get into a situation where the supplied library functions just won't do for my program, I write my own. Such is life. Mario