[Rev 03] RFR: 8217472: Add attenuation for PointLight
Nir Lisker
nlisker at gmail.com
Sun Apr 26 19:39:39 UTC 2020
>
> Will there also be any performance drop in case you just use the default
> parameters for the lighting?
That's what we're testing.
The default, which corresponds to the current lighting, should not need
> any additional computations
> and thus no performance drop.
But there is no way to know if you're using the default values unless you
check for it, and that already is a cost.
The only way to guarantee that there is no performance drop is to add a
boolean that enables/disables these changes, and that will require
generating double the shaders - for the "on" case and for the "off" case.
We are trying to avoid this. These changes should be negligible according
to "current knowledge", but we have to test. For some reason we saw a
drop in one of the hardware configurations that was tested.
On Sat, Apr 25, 2020 at 8:33 PM Michael Paus <mp at jugs.org> wrote:
> Am 25.04.20 um 19:09 schrieb Kevin Rushforth:
> > On Fri, 24 Apr 2020 05:06:56 GMT, Phil Race <prr at openjdk.org> wrote:
> >
> >>> Here is a slightly modified test program. It fixes a compilation error
> in the previous, and also adds a system property
> >>> to set the number of quads:
> >>> It creates 200 quads by default. If you need to increase this or
> decrease it to get something in the ~ 10 fps range you
> >>> can do that with `-DnumQuads=NNNN`.
> >>> [pointlighttest.zip](
> https://github.com/openjdk/jfx/files/4526179/pointlighttest.zip)
> >> @kevinrushforth
> >> Member
> >> kevinrushforth commented Apr 18, 2020
> >>
> >> I think most of those are good suggestions going forward. As for the
> performance drop, the only place we've seen it so
> >> far is on graphics accelerators that are a few years old by now.
> >> So 50% drop on a 2015 macbook pro is OK ? Do we have numbers on recent
> macbook pros ?
> > If this were an even remotely representative use case, then no, the
> performance hit would not be OK. The test was
> > designed as an artificial "worst-case" stress test: a single mesh with a
> large number of very large (window-sized)
> > quads stacked on top of each other. Any real-world use case won't do
> this.
> >
> > We should make sure that we aren't seeing any significant performance
> drop when rendering spheres (at a couple
> > different tessellation levels) or boxes.
> >
> > -------------
> >
> > PR: https://git.openjdk.java.net/jfx/pull/43
>
> Will there also be any performance drop in case you just use the default
> parameters for the lighting?
> The default, which corresponds to the current lighting, should not need
> any additional computations
> and thus no performance drop.
>
>
More information about the openjfx-dev
mailing list