3Dickulus / FragM

Derived from https://github.com/Syntopia/Fragmentarium/
GNU General Public License v3.0
349 stars 30 forks source link

[bugfix] Spline path perspective #100

Closed 3Dickulus closed 4 years ago

3Dickulus commented 4 years ago

Description After transition to GLM camera and target spline paths perspective is wrong.

To Reproduce Steps to demonstrate the behavior:

  1. Load tutorial 30
  2. Click on 'Progressive'
  3. Click on 'Stop'
  4. Goto the 'Camera' tab
  5. Adjust FOV

Expected behavior Paths are rendered with the proper scale and orientation relative to the 3D scene with occlusion when 'Depth to Alpha' is not enabled.

Desktop

Additional context Fix will be in next push/merge cycle

in void DisplayWidget::setPerspective() change double vertAngle = 180.0 * ( 2.0 * atan2 ( 1.0, ( 1.0/fov ) ) / M_PI ); to double vertAngle = 2.0 * atan2 ( 1.0, ( 1.0/fov ) );

edit: this also requires testing for GL version for use of glLoadMatrixd()

claudeha commented 4 years ago

depends on GLM version - ancient used degrees, modern uses radians, forgot which version changed it