🪲 remove the line through the pacific #399
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Through the pacific ocean, there is a one-pixel wide line even if all GUI is disabled. The line only disappears when clouds are disabled.
![with line](https://private-user-images.githubusercontent.com/102045363/405288834-7f73d469-3202-4812-bac5-0f1cb6830756.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjQzNjksIm5iZiI6MTczOTMyNDA2OSwicGF0aCI6Ii8xMDIwNDUzNjMvNDA1Mjg4ODM0LTdmNzNkNDY5LTMyMDItNDgxMi1iYWM1LTBmMWNiNjgzMDc1Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMTM0MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNWUzMWM0NGExM2E1MGE3YmJkNTEyZGEwZmE0NDNkNTcwYTExNDFhYmNmNDI3ZDU2MjEyNjQxNjc3Mjg4OWNkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Tvr8TMafzIDQI-qiBWPggpERh1vJrevykn5J1_qcszA)
![line closeup](https://private-user-images.githubusercontent.com/102045363/405288977-cacd4b20-0b0a-4de4-a9c0-8e30a2e77d8c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjQzNjksIm5iZiI6MTczOTMyNDA2OSwicGF0aCI6Ii8xMDIwNDUzNjMvNDA1Mjg4OTc3LWNhY2Q0YjIwLTBiMGEtNGRlNC1hOWMwLThlMzBhMmU3N2Q4Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMTM0MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNGRiMzZmMzVlODRhZDMyZTI4ODBlNWEyNjM5ZmNiZjg4OTg4ZGYyYzQ4NzFmMzlmYjdlZmM4MzQ2MzYwZTM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.RkPWK5QqdXW9_LP4pLcAkxx17rTcZiAIcWKKPbNVDb4)
![no line](https://private-user-images.githubusercontent.com/102045363/405290705-1b1887e8-f043-4a8c-9fb6-2436ada155c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjQzNjksIm5iZiI6MTczOTMyNDA2OSwicGF0aCI6Ii8xMDIwNDUzNjMvNDA1MjkwNzA1LTFiMTg4N2U4LWYwNDMtNGE4Yy05ZmI2LTI0MzZhZGExNTVjNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMTM0MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYjVmNTY1ZGZkMjZlMWJkZGM4MzNlZWJkN2JhNDVkMDBiMWQxYTYzYWIzOWY3NWRjNjFiMWNjZjY2ZTc2MjNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XAGXx9IOadnXVx3nHVc3imCm9id7snCy_AybxhJRVCI)
On closer inspection it appears there are not one, but 10 lines
It is an issue with the sampling of the cloud texture at the line where u=1 and u=0 meet, similar to https://stackoverflow.com/questions/38357970/opengl-texture-repeat-artifacts.
I implemented the suggested solution of forcing a lower MAX_LOD, I found empirically, that at a maximum MipMap level of 5, the glitch reliably does not appear anymore.
Before I figured this out, I debugged the cloud rendering. Is there a reason for using one-parameter atan(y_over_x) with logic for handling the different cases, instead of using two-parameter atan(y, x). I changed this to two-parameter atan and still got the same results, is there a reason I overlooked for using single-parameter atan?