1 (edited by leviniarened 2017-10-08 05:18:17)

Topic: Distance-independent fading of map borders

I've done fading of map border using shader (without fog). So in this case we can observe map from different angles and distances. However my approach is more costly than using fog (shader makes additional texture sampling). Also your texture should support mips for smoothness on border. In my case i wanted to display as many space as possible, so my mask was rectangular but you can create your own mask(circle for example). The key idea is to use texture mask: calculate uv coords in world space corresponding to map coords(vertex position / mapsize) and it usage as uv coords of opacity texture mask. But I also added some blureness based on the distance from map center to border. Finally I'm interpolate source texture and modifided texture using mask.
If someone needs shader I can share.

P.S. You don't need to sample circle mask. In that case you can easily calculate circle directly in shader (computing a smooth rectangle a bit harder).