游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1379|回复: 0

D3DXMatrixPerspectiveOffCenterLH ProjMatrix

[复制链接]

414

主题

611

帖子

621

积分

高级会员

Rank: 4

积分
621
发表于 2008-1-8 15:37:00 | 显示全部楼层 |阅读模式
How to calculate the parameters of D3DXMatrixPerspectiveOffCenterLH and let its Projection Matrix is the same as D3DXMatrixPerspectiveFovLH(&mProj, 0.5f, 1.0f, NEARPLANE, FARPLANE);

D3DXVECTOR3 m_LightPos=D3DXVECTOR3(-5.0f, 5.0f, -2.0f);

D3DXMATRIX mView, mProj;
D3DXVECTOR3 vLookatPt = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
D3DXVECTOR3 vUpVec = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
D3DXMatrixLookAtLH(&mView, &m_LightPos, &vLookatPt, &vUpVec);

D3DXMatrixPerspectiveFovLH(&mProj, 0.5f, 1.0f, NEARPLANE, FARPLANE);

//D3DXMatrixPerspectiveOffCenterLH(&mProj,0, 1, -1, 0, 1, 100);
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-23 22:34

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表