-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image light orientation inconsistent with panorama #7167
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Here's a live example: https://editor.p5js.org/davepagurek/sketches/0smDG7pB_ ![]() ![]() ![]() |
Sorry for the oversight, as @davepagurek mentioned on discord there's a 90-degree rotation difference between If someone is thinking of adding an offset to panorama, it's using the sphereMapping algorithm used here. https://github.com/processing/p5.js/blob/main/src/webgl/shaders/sphereMapping.frag#L18 By fixing the y-axis and rotating other two axis, it could be solved I think. Maybe we can add just these lines after line 18 to solve this float temp = rotatedNormal.z;
rotatedNormal.z = rotatedNormal.x;
rotatedNormal.x = -temp; Hope this helps, thanks:) |
@all-contributors please add @Martin-Lorentzon for bug |
I've put up a pull request to add @Martin-Lorentzon! 🎉 |
Most appropriate sub-area of p5.js?
p5.js version
v1.10.0 July 31, 2024
Web browser and version
Microsoft Edge Version 127.0.2651.98 (Official build) (64-bit)
Operating system
Windows 10
Steps to reproduce this
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: