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

Kevin Rushforth kcr at openjdk.java.net
Sat Jun 5 17:29:58 UTC 2021


On Sat, 22 May 2021 02:27:41 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

> Did you test the different `computeSpotlightFactor` methods in the shader? I got some 4 fps difference between the best and worst cases.

Here are the performance numbers on my Mac (using the discrete `AMD Radeon Pro 5300M` graphics chipset) using the using the LightingSample test program with a mesh of 1000 quads rendered with 3 point lights and no attenuation:

| shader compute method | fps |
|  -------------------- | ---- |
| computeSpotlightFactor | 10.75 |
| computeSpotlightFactor2 | 9.40 |
| computeSpotlightFactor3 | 7.70 |

So it looks like computeSpotlightFactor is the winner. Does that match your observations? It might be worth some further tuning.

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

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


More information about the openjfx-dev mailing list