I'm drawing a 3d rendered island which has a day / night cycle and a sun that rises and sets over water.
The sea is rendered with a fragment shader derived from this Blinn-Phong tutorial.
The sun's position is a represented by a point at its centre which moves over time to simulate a day / night cycle. When the point is over the horizon, the sea shader uses Blinn-phong and a normal map to produce a reflection.
I don't like the way it renders at the moment for a couple of reasons. The most serious issue is light reflection is calculated from a single point at the centre of the sun's disc so that the light flicks on or off in a totally abrupt fashion as the centre of the sun crosses the horizon. See the pictures for what I mean.
The second issue also evident in the picture is the light is a pin prick in the centre of the sun and the reflection on the sea is too focussed. It should spread from the whole disc not just a point in the centre. The Sun's disc btw is just a billboard.
What I want to happen is for the the light levels gradually increase as the sun rises and correspondingly decrease as it sets. I also want the light on the sea to spread from the whole disc rather than a pin point in the middle. This can't be a compute intensive change because the code is destined to run on mobile GPUs on android but it should still be pleasing.
I could potentially move the light point to the top of the sun to make the light appear more early and set later. However that might interfere with the light calculations in an adverse way (now the centre of the light is the top of the sun). Maybe I could start with the light point at the top and slowly move it to the centre as the sun rises (and back again as the sun sets) to counteract this problem. I could also calculate an intensity when the sun is low in the sky based on how much of the sun is showing and gradually increase the intensity to make the light stronger.
I could potentially have a cluster of light sources covering the centre, top, left, bottom and right but this increases complexity a lot and could still look weird.
Does anyone have comments on the feasibility of these ideas or have others ways I could achieve this?