Perhaps a stupid suggestion but will it work if you extend the water tunnel graphics to the tile immediatly behind the tunnel entrance? I.e. extend it with a flat green tile.
That of course will look great, if it's a rail tile, a house tile or an industry tile. Or even a water tile.
@Roujin: nice to see you back
Wrt tunnels: wouldn't it make sense to implement for water tunnels straight the way we draw newgrf rail tunnels which allow separate drawing of ground, rail, portal and slope. Of course ground and rail would in this case be the water tile - but portals and slope could be a separate sprite which do not contain the water itself. And it could contain an overlay sprite (analogue to rail) which would allow to simulate shaddow on the water.
I don't know, you tell me - if this is preferred I shall change my patch accordingly. I thought this seperate-drawing-scheme was done for rail mainly so that railtype newgrfs can be made independent of landscape baseset/newgrf, so as there is no such thing as canaltypes, this would not be useful for water tunnels.
The overlay sprite to simulate shadow is news to me. So if you think this is worth the (suspected) drawing overhead, tell me and I shall change it for the next version of my patch.
[clip rect ideas]
That sounds like a good idea, not only for ships, but for all vehicles, allowing longer vehicles without glitches. Hmm, that immediately makes it sound out of scope for this patch, but fit for a standalone patch.
Do you know if there is code in place already for drawing limited to a clipping rect, or would this have to be done from the ground up?