On Fri, 7 Aug 2020 22:30:39 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> The only impact this has is that the range will be maximal instead of 0. >> When these reach the shader, they will run the >> lighting computation as opposed to skipping it. I'm not sure if this will >> have any performance impact though. > > In that case, it seems like a generally useful optimization (not just at > initialization) to send down `maxRange` as 0 > whenever `ca`, `la`, and `qa` are all at their default values. Actually, my above comment is wrong. A `maxRange` of 0 will effectively disable the lighting, even in the case whether the other three values are 1, 0, 0. So `maxRange` should be set to `Float.POSITIVE_INFINITY` (or else just use the default constants). ------------- PR: https://git.openjdk.java.net/jfx/pull/43