- Timestamp:
- 11/06/08 16:38:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3105 r3106 963 963 mOldProjViewMatrix = mProjViewMatrix; 964 964 mOldEyePos = mEyePos; 965 966 967 /////////////////// 968 969 Matrix4x4 matViewing, matProjection; 965 mEyePos = mCamera->GetPosition(); 970 966 971 967 // hack: temporarily change far to improve precision 972 968 const float oldFar = mCamera->GetFar(); 973 mCamera->SetFar(1e3f); 969 const float oldNear = mCamera->GetNear(); 970 //mCamera->SetFar(1e3f); 971 //mCamera->SetNear(3.0f); 974 972 //mCamera->SetFar(1e2f); 975 973 976 977 //mCamera->GetModelViewMatrix(matViewing); 974 Matrix4x4 matViewing, matProjection; 975 /* 976 mCamera->SetPosition(mOldEyePos - mEyePos); 977 978 mCamera->GetModelViewMatrix(matViewing); 979 mCamera->GetProjectionMatrix(matProjection); 980 981 mOldProjViewMatrix = matViewing * matProjection; 982 mCamera->SetPosition(mEyePos);*/ 983 984 /////////////////// 985 986 978 987 mCamera->GetViewOrientationMatrix(matViewing); 979 988 mCamera->GetProjectionMatrix(matProjection); … … 981 990 mProjViewMatrix = matViewing * matProjection; 982 991 ComputeViewVectors(mCamera, mCornersView[0], mCornersView[1], mCornersView[2], mCornersView[3]); 983 mEyePos = mCamera->GetPosition(); 984 992 985 993 986 994 // switch roles of old and new fbo … … 1018 1026 // revert to old far plane 1019 1027 mCamera->SetFar(oldFar); 1028 mCamera->SetNear(oldNear); 1020 1029 } 1021 1030
Note: See TracChangeset
for help on using the changeset viewer.