Not draw tiles with light level of zero

Hi,

When my tiles have a light level of zero, there is no point in drawing them, so I was thinking, as I have a cloud layer behind my tile layer this would show through if I don’t draw the tiles with light level of zero. Would you just draw a black sprite size of screen behind the tile layer if say not above ground and under ground?

My code only draws what the camera sees, so only draws 60x40 tiles in each frame but this includes the ones with light level of zero - thought this could optimize it more.

Thanks

Do what you said, render a face underneath all that is black. That would work. There is no point rendering 20 tiles, given that you actually ignore them (if(!lightLevel >= 20){render();}), if they could be substituted unnoticeable by one quad (you don’t even need to texture it because out_Color = vec4(1,1,1,1); (maybe 0,0,0,1 as I can’t remember which is black x)).

Yeah, this is what I thought, so could just have some code in my parallax cloud layer that checks where camera is, if underground just draw black background.

Ta.

You can always draw the black background.