Is there any way of manipulating the view frustrum of a camera to enlarge it, in all directions, by something like 10%, or 50 pixels/units, without enlarging the actual camera view frustrum? (Like creating a new frustrum with enhanced values)
The reason I'm asking is that, by doing view frustrum culling, I'm losing some primitives I shouldn't be, because the frustrum's planes aren't actually behind any of the corners, so they think that the primitive doesnt exist.
View frustrum manipulation
-
- Posts: 360
- Joined: Tue Feb 10, 2004 2:20 am
- Location: Lubbock, TX
You could use the AABB of the view frustum for culling.
Or do the following:
matrix4 mat;
mat.setScale(Vector3(0.1,0.1,0.1));
SViewFrustrum myFrust;
myFrust.transform(mat);
This scales the frustrum by factory 0.1 in every direction.
E.v. You have to make sure You don't accidently scale the original frustrum.
Tom
Or do the following:
matrix4 mat;
mat.setScale(Vector3(0.1,0.1,0.1));
SViewFrustrum myFrust;
myFrust.transform(mat);
This scales the frustrum by factory 0.1 in every direction.
E.v. You have to make sure You don't accidently scale the original frustrum.
Tom
-
- Posts: 62
- Joined: Wed Jun 09, 2004 5:51 am
-
- Posts: 360
- Joined: Tue Feb 10, 2004 2:20 am
- Location: Lubbock, TX
-
- Posts: 62
- Joined: Wed Jun 09, 2004 5:51 am