Skip to content

Fix for camera pitch clamping (software renderer)#599

Open
jerethk wants to merge 1 commit intoluciusDXL:masterfrom
jerethk:Clamp_camera_pitch_fix
Open

Fix for camera pitch clamping (software renderer)#599
jerethk wants to merge 1 commit intoluciusDXL:masterfrom
jerethk:Clamp_camera_pitch_fix

Conversation

@jerethk
Copy link
Copy Markdown
Contributor

@jerethk jerethk commented May 3, 2026

This fixes a bug associated with #468
where I clamped the camera's pitch for the software renderer, but did not account for situations where pitch is expressed as a value between 180 and 360.

Angles between 180 and 360 need to first be converted to a value between -180 and 0, by subtracting 360
(This will not fix values that are > 540 and < 180 but I think it is fair to assume that such values won't be encountered in practice. This issue only occurred when transforming the camera object with a VUE, where all pitch values will be between 0 and 360)

If an angle between 180 and 360 degrees is passed in, convert it to negative by subtracting 360

This will not fix values that are > 540 and < 180 but I think it is fair to assume that such values won't be encountered in practice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant