Hi All, I am building a game for fun/learning using SFML that basically simulates a planet. The surface of the planet is represented through a layer of square terrain sprites, with sprites of other objects such as trees or clouds drawn on layers above this base. When fully zoomed out there can be anywhere up to 36K 8x8 px terrain sprites drawn on my 1920x1200 screen at a time, with sprites on subsequent layers further increasing this count. Obviously this results in low FPS, and I am looking at ways to improve this (specifically I need to investigate the suitability of vertexArrays and/or tileMaps which I currently know nothing about, or as a last resort just limit zoom!), but I have a specific question regarding my implementation of lighting for a day/night cycle. Each tile on my world map has an insolation value (amount of light from sun hitting this location), and to illustrate this value the final graphical layer is an array of black tiles the same size as the terrain tiles underneath, with an opacity value applied to each tile that is the inverse of the insolation value - so in light areas most or all of the tiles underneath the black tile layer are visible, but in dark regions very little makes it through the opacity filter. Obviously as this is the equivalent of drawing the entire terrain layer again it reduces performance significantly.
My question is if this is the lowest-cost way of achieving this effect, or if there is some way of shading each terrain tile/tree/cloud/etc sprite as they are drawn to achieve the same effect that would be faster, or perhaps there is some other method that I am not aware of that would be helpful. Feel free to offer advice on improving performance of displaying my terrain tile array/trees/clouds etc if you wish also, but I have yet to research this thoroughly myself.
-Thank you for your attention.
[Edit]: spelling