[Rev 03] RFR: 8217472: Add attenuation for PointLight

Nir Lisker nlisker at openjdk.java.net
Sat Feb 22 05:45:21 UTC 2020


On Mon, 17 Feb 2020 01:53:18 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> Looks like the `jcheck` bot removed the `rfr` label because the CSR isn't complete. An incomplete CSR should be treated the same way as an insufficient number of reviewers. I filed [SKARA-262](https://bugs.openjdk.java.net/browse/SKARA-262) to track this.
> 
> I've taken the sample app and enlarged the box to fill the whole range of the lights in an attempt to have many pixels rendered for few vertices. I measured 90-115 fps during continuous animation with this patch, and 100-120 before it. I measured the fps using an external app called BandiCam on Win 10.
> 
> Will do more tests this week.

Attaching an attempt at testing performance with and without attenuation. Launch `LightingSample`  without the patch or `AttenLightingSample` with the patch. There are 2 modes, one with a single large box and another with many small boxes. Not only is there no difference in performance with and without attenuation, if the lights are turned off (so there is no shader calculation even), there is still no difference. The "single" mode gives ~120 fps, while the "multiple" mode gives ~42 fps and seems to be limited by the number of nodes in the scene rather than anything related to lighting.

Either the calculations for 3 lights is negligible, or the testing is flawed. I tested on Win10 with an RX 470 4GB. Used BandiCam to measure the fps.

[attenTest.zip](https://github.com/openjdk/jfx/files/4238855/attenTest.zip)

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

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


More information about the openjfx-dev mailing list