Attemp to fix the 'bogous tile problem'
This commit is contained in:
parent
2f2d486778
commit
4ea7fc6327
2 changed files with 20 additions and 21 deletions
|
@ -513,6 +513,26 @@ static void fgMainLoop( void ) {
|
|||
//
|
||||
double visibility_meters = fgGetDouble("/environment/visibility-m");
|
||||
FGViewer *current_view = globals->get_current_view();
|
||||
// Let the scenery center follow the current view position with
|
||||
// 30m increments.
|
||||
//
|
||||
// Having the scenery center near the view position will eliminate
|
||||
// jitter of objects which are placed very near the view position
|
||||
// and haveing it's center near that view position.
|
||||
// So the 3d insruments of the aircraft will not jitter with this.
|
||||
//
|
||||
// Following the view position exactly would introduce jitter of
|
||||
// the scenery tiles (they would be from their center up to 10000m
|
||||
// to the view and this will introduce roundoff too). By stepping
|
||||
// at 30m incements the roundoff error of the scenery tiles is
|
||||
// still present, but we will make exactly the same roundoff error
|
||||
// at each frame until the center is switched to a new
|
||||
// position. This roundoff is still visible but you will most
|
||||
// propably not notice.
|
||||
double *vp = globals->get_current_view()->get_absolute_view_pos();
|
||||
SGVec3d cntr(vp);
|
||||
if (30.0*30.0 < distSqr(cntr, globals->get_scenery()->get_center()))
|
||||
globals->get_scenery()->set_center( cntr );
|
||||
|
||||
globals->get_tile_mgr()->prep_ssg_nodes( current_view->getSGLocation(),
|
||||
visibility_meters );
|
||||
|
|
|
@ -232,27 +232,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Let the scenery center follow the current view position with
|
||||
// 30m increments.
|
||||
//
|
||||
// Having the scenery center near the view position will eliminate
|
||||
// jitter of objects which are placed very near the view position
|
||||
// and haveing it's center near that view position.
|
||||
// So the 3d insruments of the aircraft will not jitter with this.
|
||||
//
|
||||
// Following the view position exactly would introduce jitter of
|
||||
// the scenery tiles (they would be from their center up to 10000m
|
||||
// to the view and this will introduce roundoff too). By stepping
|
||||
// at 30m incements the roundoff error of the scenery tiles is
|
||||
// still present, but we will make exactly the same roundoff error
|
||||
// at each frame until the center is switched to a new
|
||||
// position. This roundoff is still visible but you will most
|
||||
// propably not notice.
|
||||
double *vp = globals->get_current_view()->get_absolute_view_pos();
|
||||
SGVec3d cntr(vp);
|
||||
if (30.0*30.0 < distSqr(cntr, globals->get_scenery()->get_center()))
|
||||
globals->get_scenery()->set_center( cntr );
|
||||
|
||||
bool draw_otw = fgGetBool("/sim/rendering/draw-otw");
|
||||
bool skyblend = fgGetBool("/sim/rendering/skyblend");
|
||||
bool use_point_sprites = fgGetBool("/sim/rendering/point-sprites");
|
||||
|
|
Loading…
Add table
Reference in a new issue