I do not post right here a great deal, so you have almost certainly not noticed me ahead of –
I am functioning on my personal game, utilizing my personal engine written in OpenGL. The game is all in all 2D, all my mechanics and physics are in spot – but I was questioning “would not it be cool to add dynamic lighting in the mix?”.
So now I am pondering how I could implement this. I’ve been browsing for what methods will implement this, and I am not yielding any fantastic final results – I might be negative at browsing, I do not know.
The notion I have in my head, is that for every single fragment in my lightmap, I will will need to cast a ray towards the light supply(s), and adjust the worth according to if it really is lit or not. This will definetely perform – but I be concerned that carrying out this on my complete complete screen 1080p game just about every frame will not be a tad bit highly-priced.
I’ve decided to ponder on this issue for a even though, ahead of I go on and implement it – there are nevertheless a lot of other points to do in my game, so it can wait. But even though I do so, I believed I ought to attempt ask a person right here.
Does any individual have any experiences carrying out this? Any instance implementations to show to?