RFR: 8217472: Add attenuation for PointLight [v9]

Kevin Rushforth kcr at openjdk.java.net
Sat Aug 8 16:06:40 UTC 2020


On Wed, 29 Jul 2020 23:09:52 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> CSR: https://bugs.openjdk.java.net/browse/JDK-8218264
>
> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed whitespace

modules/javafx.graphics/src/main/resources/com/sun/prism/es2/glsl/main1Light.frag line 91:

> 90:
> 91:         float attenuatedColor = (lights[0].color).rgb / (lights[0].attn.x + lights[0].attn.y * dist +
> lights[0].attn.z * dist * dist); 92:         d = clamp(dot(n, l), 0.0, 1.0) * attenuatedColor;

This fails (on macOS) at shader compilation time with:

Shader compile log: ERROR: 0:325: Incompatible types in initialization (and no available implicit conversion)
ERROR: 0:326: Use of undeclared identifier 'attenuatedColor'
...

That should be `vec3` (same for the other two shader files)

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

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


More information about the openjfx-dev mailing list