home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / DOCS / README / D3D.TXT < prev    next >
Text File  |  1996-09-09  |  6KB  |  157 lines

  1. **********************
  2. ***                ***
  3. ***                ***
  4. *** Direct3D Notes ***
  5. ***                ***
  6. ***                ***
  7. **********************
  8.  
  9. Last updated  September 5, 1996
  10.  
  11.  
  12. Notes on the software emulation drivers
  13. =======================================
  14.  
  15.  
  16. RAMP driver support
  17. ===================
  18. Optional Z buffering.
  19. Color key and stippled transparency.
  20. Mono interpolated rasterization only.
  21. Point sampled perspective correct textures.
  22. Flat and Gouraud shade modes.
  23.  
  24. Performance notes for the RAMP driver
  25. =====================================
  26. Texture mapping performance is heavily gated by the speed of memory.
  27. There are a number of ways of maximizing the cache performance of your
  28. textures.  The smaller the textures are, the better chance they have of being
  29. maintained in the secondary cache.  This is crucial for keeping performance
  30. high.  Also, changing the texture per primitive will thrash the cache.  Try
  31. and keep polygons grouped in order of the textures they use.
  32.  
  33. When using Z buffering and texturing, rendering your scene from front to
  34. back will increase performance.  The textured Z buffered primitives
  35. pre-test the Z buffer on a scanline basis.  If a scanline is hidden by a
  36. previously rendered polygon it is trivially rejected.  If this is the case, Z
  37. buffering performance can exceed non-Z performance.
  38.  
  39. The retained mode API automatically orders its scenes from front to back
  40. to facilitate this optimization.
  41.  
  42. In it often a good idea to use the D3DTest program to verify performance
  43. results with different drivers, especially where hardware is involved.
  44.  
  45.  
  46. RGB driver
  47. ==========
  48.  
  49. There is now an MMX optimized version of the RGB driver.
  50. If you have an MMX capable PC the RGB software emulation will automatically
  51. be accelerated. There is an application included in the sdk\bin directory,
  52. mmxtog.exe which allows you to switch MMX acceleration off and on for the
  53. RGB driver.
  54.  
  55. Release notes for D3D MMX driver
  56.  
  57. Functionality
  58. -------------
  59.  
  60. 1. D3D's external interfaces unchanged, all examples and all apps that
  61. can use the RGB driver should be able to run with the RGB MMX driver.
  62.  
  63. 2. Only 16-bit color depths have been optimised.  There is a relatively
  64. minor (2X) improvement in 8-bit dithered RGB rendering.
  65.  
  66. 3. The following are yet-to-be-implemented: mip-mapping, 16-bit dithering.
  67.  
  68. 4. The Z-buffer is 16-bit, but is signed, so the farthest Z-value is 0x7fff,
  69. and the nearest is 0x8000.  This should not affect you unless you examine
  70. the Z-buffer directly.
  71.  
  72. 5. There are still some accuracy problems with the rendering: these are
  73. most clearly shown by the colored flashes that appear in the "twist"
  74. example.  We're working on this problem right now, and should have
  75. fixes soon.
  76.  
  77. 6. The driver only supports the PAL8 texture format.  D3D apps should detect
  78. this and create the texture appropriately.  This format is the same as
  79. the one supported by the ramp driver.
  80.  
  81. Performance
  82. -----------
  83.  
  84. 1. Performance is much better when all surfaces are in systemmemory, this
  85. includes the rendering target and all textures.
  86.  
  87. 2. The current MMX RGB driver is not complete, and there are several
  88. major performance improvements that we plan to make.  Expect another
  89. improvement of about 10% in all benchmarks for the MMX RGB driver,
  90. though the more sophisticated the rendering operation, the bigger the
  91. improvement.  The biggest improvement should be in Z-buffered
  92. gouraud-shaded perspective-correct texture-mapping.  Perspective
  93. correction will be much faster in the next beta.
  94.  
  95. 3. Performance is better than that of ramp mode in most situations.
  96. There are some performance bottlenecks that we have yet to address.
  97. We suggest you run the "tunnel" example with the MMX driver to get a
  98. feel for the changed relative costs of rendering qualities: for
  99. example, the speed of gouraud shading is now much closer to that of
  100. flat-shading.  To get the best performance from the tunnel, do the
  101. following:
  102.  
  103. Specular highlights     OFF
  104. Fog                     OFF
  105. Perspective Correction  OFF
  106. Gouraud shading         ON
  107.  
  108. With these settings, you should be getting about 29Hz for the tunnel
  109. running in systemmemory fullscreen at 640x400x16.
  110.  
  111. 4. The existing ramp driver works best on textures that are 256x256.
  112. This restriction has been removed in the MMX driver: it supports all
  113. texture dimensions equally well. It is still important to keep the total
  114. texture size as small as possible to reduce memory bandwidth.  Note how
  115. fast the tiny checker texture runs in the tunnel.  The checker texture is
  116. only 64 bytes instead of 64k like most of the other textures in the SDK.
  117. 256x2048 is a reasonable size for the texture in a game.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. Known Issues
  125. ============
  126. When using RGB software rasterisation, D3DRMMATERIALMODE_FROMFRAME
  127. does not work correctly if the object is unlit.
  128.  
  129. It is not currently possible to load textures from resources if the code
  130. resides in a dll.
  131.  
  132. Background depth images do not double buffer correctly in the retained
  133. mode api (page flipping scenario).  Use IDirect3DRMViewport::ForceUpdate()
  134. to force the dirty region to be updated.
  135.  
  136. The following issues is not made clear in the documentation:
  137. 1) SetOrientation overrides any previous shear or scale applied to a
  138. frame.
  139.  
  140. 2) Texture Transparency.  If the retained mode API has to sample down
  141. the colors used in a texture in order to, for example, palettize it,
  142. the color you're using as the transparent color may get remapped to
  143. another close color and transparency will no longer work.  In order to
  144. stop this happening, pick a color to use for transparency that is not
  145. close to any other color in the texture.
  146.  
  147. The Matrox Millenium driver does not render correctly fullscreen
  148. unless Clear is called at least once.  Since the Millenium does not
  149. support texture mapping, this will not affect the types of application
  150. which do not use Clear.  A workaround for this issue is to call Clear
  151. in your application once before entering the rendering loop.
  152.  
  153. When using the Retained Mode method IDirect3DRM::LoadTexture, the texture
  154. is inverted when loaded from a BMP file. The simplest work around is to
  155. reverse the meshs texture coordinates or load from a PPM file.
  156.  
  157.