Java lighting in 2D Games: Javafx


I’m editing this down, as it does seem on second read, like a bit of a rant!

This is another lighting question. I did write to the JavaFX forum and ask if they had any plans to open the JSL shader language up to the public API. The answer was no. This is a shame, as I really think shaders would help the platform.

In my current game, I write direct to the canvas, but I’ve tried converting the canvas to use the scene graph along with their Pointlight. This took me from 100’s FPS to low low FPS. (And my dev machine is spec’d)

I’ve tried blending blacked out alpha composites, with white areas to expose the light, but this looked bad and was inflexible.

I’m wondering if anyone has any other suggestions on a solution to this?