Cykyrios / Godot360

360 degree rendering with various projections in Godot
MIT License
54 stars 3 forks source link

Fix shader for portrait mode viewports #3

Closed guillaumeriousat closed 1 month ago

guillaumeriousat commented 1 month ago

The two branches of the if that starts at line 195 of camera360.gdshader were identical. I changed the logic and the shader now behaves better when the viewport is taller than wide. The distortion used to get progressively less centered as the viewport's width diminished.

Before : image After : image

These images were taken by activating the grid, switching to panini and increasing the fov to 230deg without any rotation of the camera

Cykyrios commented 1 month ago

Good catch, thanks for the fix!