Greeting everyone.
I currently am preparing a port of my 2d plain java game to lwjgl. The game is tilebased and currently uses per-pixel rendering in pure java.
I have made a test version with lwjgl and everything seems to run pretty smooth.
Though I have encountered one problem(as I’m not that familiar with lwjgl and opengl) of porting the game. In the pure java version the game achieves lighting by adjusting the rgb value of each individual pixel as they are rendered.
The lighting is tile-based and each tile-light value is stored in array(which is only updated whenever a new lightsource is placed), from which the rgb values are adjusted.
Picture showing the lighting:
Here the light around the bonfire is slightly tinted. The rest is just the rgb values lowered(if it is an entity, the light value is based).
What would be a good way to implement such a ‘simple’ form of light in lwjgl?