DXSDK Doc's Optimization Technique

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: M Owais Khan (mowaiskhan_80_at_yahoo.com)
Date: 06/29/04

  • Next message: philB: "Depth shadow maps without depthtexture or PS"
    Date: 29 Jun 2004 00:47:44 -0700
    
    

    Hi,
            I've read the following snippet from DXSDK tutorial on "World
    Transformation".I've implemented this technique using 2 D3DMATRIX16
    variables for View Matrix.One is used to hold Identity Matrix values
    and other holds current View Matrix which keeps changing as i move my
    camera.Please,Review this technique.It seems to me no optimization at
    all.Or i've headed in the wrong direction.
    Thanks,
    Owais.

    >From DXSDK Docs.

    Note Direct3D uses the world and view matrices that you set to
    configure several internal data structures. Each time you set a new
    world or view matrix, the system recalculates the associated internal
    structures. Setting these matrices frequently—for example, thousands
    of times per frame—is computationally time-consuming. You can minimize
    the number of required calculations by concatenating your world and
    view matrices into a world-view matrix that you set as the world
    matrix, and then setting the view matrix to the identity. Keep cached
    copies of individual world and view matrices so that you can modify,
    concatenate,and reset the world matrix as needed. For clarity, in this
    documentation Direct3D samples rarely employ this optimization.


  • Next message: philB: "Depth shadow maps without depthtexture or PS"

    Relevant Pages

    • Re: DXSDK Docs Optimization Technique
      ... > variables for View Matrix.One is used to hold Identity Matrix values ... > configure several internal data structures. ... > documentation Direct3D samples rarely employ this optimization. ...
      (microsoft.public.win32.programmer.directx.graphics)
    • Re: How does directx work - World or View transforms and rotations
      ... MSDN) i set the view to identity matrix and have a camera matrix that ... This is a premature optimization. ...
      (microsoft.public.win32.programmer.directx.managed)