Amana’s Sky Shader Worked Perfectly, Except It Kept Getting the Weather Wrong

https://hackernoon.imgix.net/images/sNoL9lrPBOcXCkwYBP14v5gBJTZ2-hb93a6g.jpeg

Amana is a solo-built iOS app that draws the sky outside your window — from your time, your location and the position of the sun — and then tries to get you to put the phone down and go look at the real one. It is on the App Store.

I already wrote about why I abandoned satellite imagery for an on-device sky: from orbit, a clear sky is a dark ocean. The blue you see is scattering, and it only exists from below. This piece is the part after that decision — what actually broke once the sky was being generated on the device.

The short version: the physics was never the problem. All three bugs below are cases where the shader was internally correct and still produced a sky that contradicted the weather outside. Two of them were composition-order mistakes. One was a color-space mistake. None...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE