Ignore:
Timestamp:
04/01/07 00:02:16 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/pathmap/FinalCompositionRenderStrategy.cpp

    r2197 r2304  
    5353 
    5454        D3DXMATRIX torchMatrix; 
    55         D3DXMatrixTranslation(&torchMatrix, 0.0, -pathMapEffect->parameters->Get(fTorchDistance), 0.0); 
     55        D3DXMatrixTranslation(&torchMatrix, -pathMapEffect->parameters->Get(fTorchDistance), -pathMapEffect->parameters->Get(fTorchDistance), 0.0); 
     56//      D3DXMatrixTranslation(&torchMatrix, 0.0, 0.0, pathMapEffect->parameters->Get(fTorchDistance)); 
    5657 
    5758        effect->SetFloatArray("occProjToTexMatrix", opttme, 9); 
    5859        effect->SetMatrix("occWorldToProjMatrix", &(*pathMapEffect->lightCamera->GetViewMatrix() * *pathMapEffect->lightCamera->GetProjMatrix())); 
     60         
    5961 
    6062        effect->SetTexture("depthMap", pathMapEffect->depthMapTexture); 
     
    6567 
    6668        if(pathMapEffect->parameters->Get(bLookFromLight)) 
    67                 effect->SetMatrix("modelToProjMatrix",  
    68                         &( entity->modelWorldTransform * *pathMapEffect->lightCamera->GetViewMatrix() * torchMatrix * *pathMapEffect->lightCamera->GetProjMatrix() ) ); 
     69        { 
     70                if(pathMapEffect->parameters->Get(bCruise)) 
     71                                                effect->SetMatrix("modelToProjMatrix",  
     72                                &( entity->modelWorldTransform * pathMapEffect->shipPosInverse * torchMatrix * *pathMapEffect->lightCamera->GetProjMatrix() ) ); 
     73                else 
     74                        effect->SetMatrix("modelToProjMatrix",  
     75                                &( entity->modelWorldTransform * *pathMapEffect->lightCamera->GetViewMatrix() * torchMatrix * *pathMapEffect->lightCamera->GetProjMatrix() ) ); 
     76        } 
    6977        else 
    7078                effect->SetMatrix("modelToProjMatrix",  
Note: See TracChangeset for help on using the changeset viewer.