On Fri, 17 Jun 2022 14:27:58 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:

>> Nir Lisker has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Remove unused comments, clean constructor
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/NGShape3D.java 
> line 211:
> 
>> 209:                 (float) cameraPos.x, (float) cameraPos.y, (float) 
>> cameraPos.z,
>> 210:                 1.0f, 1.0f, 1.0f, 1.0f,
>> 211:                 NGPointLight.getDefaultCa(), 
>> NGPointLight.getDefaultLa(), NGPointLight.getDefaultQa(), 0,
> 
> `isAttenuated` was passed as 1 earlier. Is changing it to `0` works same ?

Yes, in `PsMath.h::computeLight`, there is a check if the light requests 
attenuation. In general, this is done only for directional lights (that are not 
attenuated), but in this case we know that this point light is not attenuated 
so passing 0 skips the redundant calculation. In theory this would improve 
performance, but because this light can only exist alone I don't expect 
anything measurable.

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

PR: https://git.openjdk.org/jfx/pull/789

Reply via email to