File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,8 +316,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
316316{
317317 // Convert screenPoint to device coordinates (between -1 and +1)
318318 Vector3 deviceCoord = screenPoint;
319- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
320- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
319+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
320+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
321321
322322 // Transform vector by unprojection matrix
323323 Matrix4 unprojection = mView * mProjection ;
Original file line number Diff line number Diff line change @@ -316,8 +316,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
316316{
317317 // Convert screenPoint to device coordinates (between -1 and +1)
318318 Vector3 deviceCoord = screenPoint;
319- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
320- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
319+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
320+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
321321
322322 // Transform vector by unprojection matrix
323323 Matrix4 unprojection = mView * mProjection ;
Original file line number Diff line number Diff line change @@ -324,8 +324,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
324324{
325325 // Convert screenPoint to device coordinates (between -1 and +1)
326326 Vector3 deviceCoord = screenPoint;
327- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
328- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
327+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
328+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
329329
330330 // Transform vector by unprojection matrix
331331 Matrix4 unprojection = mView * mProjection ;
You can’t perform that action at this time.
0 commit comments