-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed lights registration in Forward3D grid for landscape-oriented ca…
…mera
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,10 +344,14 @@ namespace Ogre | |
interpTR[1] = Math::lerp( topRight[0], topRight[1], fW ); | ||
|
||
// Find the rectangle that encloses both the front and back faces. | ||
const Vector2 finalBL( std::min( interpBL[0].x, interpBL[1].x ), | ||
std::min( interpBL[0].y, interpBL[1].y ) ); | ||
const Vector2 finalTR( std::max( interpTR[0].x, interpTR[1].x ), | ||
std::max( interpTR[0].y, interpTR[1].y ) ); | ||
const Vector2 finalBL( std::min( std::min( interpBL[0].x, interpBL[1].x ), | ||
std::min( interpTR[0].x, interpTR[1].x ) ), | ||
std::min( std::min( interpBL[0].y, interpBL[1].y ), | ||
std::min( interpTR[0].y, interpTR[1].y ) ) ); | ||
const Vector2 finalTR( std::max( std::max( interpTR[0].x, interpTR[1].x ), | ||
std::max( interpBL[0].x, interpBL[1].x ) ), | ||
std::max( std::max( interpTR[0].y, interpTR[1].y ), | ||
std::max( interpBL[0].y, interpBL[1].y ) ) ); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dyunchik
Author
Contributor
|
||
|
||
uint32 startX, startY, endX, endY; | ||
projectionSpaceToGridSpace( finalBL, slice, startX, startY ); | ||
|
I assume this bug happened because camera->getOrientationMode() returned
OR_DEGREE_180
?@dyunchik