On Sat, 22 May 2021 02:27:41 GMT, Nir Lisker <nlis...@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

Reply via email to