Jump to content
  • Advertisement
Sign in to follow this  
nini

D3DXVec3Project Problem !!! LensFlare Effect

This topic is 5453 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi , in the case of an implementation of lens flare effect here is what a i'm doing : Position the Cam : Eye (0,0,1) At (0,0,10) Up (0,1,0) i've a point : SunPos D3DXVECTOR3(0,10,1) when i execute this code , i get wrong values in screen coord... D3DXMATRIX View,Proj; dev->GetTransform(D3DTS_VIEW,&View); dev->GetTransform(D3DTS_PROJECTION,&Proj); dev->GetViewport(&pViewport); D3DXMatrixTranslation(&World,Eye.x,Eye.y,Eye.z); dev->SetTransform(D3DTS_WORLD,&World); D3DXVec3Project(&Sun,&SunPos,&pViewport,&Proj,&View,&World); Sun is (394,-4586.92,-1.19209) wich can't be my screen coordinate. Please help me ! Best regards

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!