Ville Helin wrote:
| Holy moly! > [NEW] Hardware Texture & Lighting 3D instructions Any info about these? Benchmarks, how to use, what they do... ? Keep up the good work!
|
Hello Ville, Our focus for these texture instruction are easy of use, clean coding, and performance improvements. We have added the new instructions TEX8, TEX16, TEX24 to the AMMX instruction documentation that you will find under the top tap "Coding". We are right now prepare some coding snippets to be put in our library for re-used and some demo effects to show the usage and features. Arne will show some examples soon. Here is a small example comparing old code
Oldloop: move.l A2,D4 ; VV.vv move.l A3,D5 ; UU.uu lsr.l #8,D4 ; 0V.Vv swap D5 ; uu.UU move.b D5,D4 ; 0V.VU and.l #$FFFF,D4 ; 00.VU move.b (A0,D4.l),D0 add.l D2,A2 add.l D3,A3 move.b D0,(A1)+ dbra D7,oldloop
Newloop: tex8.256 (A0,(A2,A3)),D0 add.l D2,A2 add.l D3,A3 move.b D0,(A1)+ dbra D7,Newloop
The new code makes texture mapping much simpler to code and increases performance. Typical "Doom/Tomp Raider" texture code has with it a speed of 1 texel every 3 clocks. Which means roughly a performance increase of 3 times. TEX8 and TEX16 will make code simpler and cleaner and will improve speed. The performance increase is about 300%. Many old games/demos used similar code and these instructions are designed so that they can be used as direct replacement. TEX24 offers features which were never used on Amiga before. TEX24 supports direct access to compressed truecolor textures and also supports gouraud shading of the resulting 24bit texel. Normal 68k code would need over 100 instructions to do the same works, that this new TEX24 instruction does in a single ASM instruction. The goal of these instructions is to make coding of 3D demos and games simpler and easier and to increase performance so that low end 3D games like Tomb Raider or Playstation 1 games become a reality on Amiga. The instruction are designed so that they can be shared by the V4 cards (V4,Firebird,Icedrake) but also by the V1200 accelerator.
|