RFR: 8234920: Add SpotLight to the selection of 3D light types [v14]

Kevin Rushforth kcr at openjdk.java.net
Mon Jun 7 13:36:34 UTC 2021


On Sun, 6 Jun 2021 16:19:46 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

> > So it looks like `computeSpotlightFactor` is the winner. Does that match your observations? It might be worth some further tuning.
> 
> Yes, on Ubuntu. On Win, `computeSpotlightFactor3` was the best for me. I detailed my findings in the topmost comment.

Oh, right. I didn't read that carefully.

In that case, using `computeSpotlightFactor` in the GLSL shaders and `computeSpotlightFactor3` in the HLSL shaders seems like the way to go. If we are settled on this, the two you aren't using should be commented out or `#ifdef`ed out.

> What further tuning are you thinking of?

I don't have anything specific in mind. I was just wondering if there might be additional optimizations that one could do the `computeSpotlightFactor` method. Even if so, it could probably be done in a follow-on bug. The more interesting question is whether the gap between what we have now and what is possible for simple lights justifies additional shaders. Maybe not for point lights, but we need to at least consider it when you add directional lights.

-------------

PR: https://git.openjdk.java.net/jfx/pull/334


More information about the openjfx-dev mailing list