3D light enhancements

Nir Lisker nlisker at gmail.com
Tue Jan 22 06:00:58 UTC 2019


I created [1] for upgrading the shader model and [2] for adding attenuation
to SpotLight.

[1] https://bugs.openjdk.java.net/browse/JDK-8217470
[2] https://bugs.openjdk.java.net/browse/JDK-8217472

On Mon, Jan 21, 2019 at 5:44 PM Kevin Rushforth <kevin.rushforth at oracle.com>
wrote:

> Both enhancements seem like interesting additions to JavaFX's 3D API. As
> long as it's only the 3D support that will no longer work on older cards
> -- meaning that those older cards will no longer report that
> ConditionalFeature.SCENE3D is supported, but 2D HW acceleration will
> still be available -- then this seems fine to me. Given that these
> enhancements will only touch the 3D shaders, it should be fairly
> straight-forward to make the check for shader model be part of the "is
> 3D supported" calculation.
>
> -- Kevin
>
>
> On 1/2/2019 4:31 PM, Nir Lisker wrote:
> > Hi All,
> >
> > FalcoTheBold and I been discussing enhancements to the 3D lighting
> > mechanism on GitHub [1]. The summary is as follows:
> >
> > 1. We want to add additional light types: directional light and
> spotlight.
> > 2. We want to add attenuation and range parameters to the current point
> > light and future spotlight.
> >
> > Our efforts are currently directed at 2, specifically, adding attenuation
> > (inc. range) to the current point light. Some preliminary results for the
> > d3d pipeline can be seen in [2]. I'm working on the d3d pipeline (with a
> > lot behind-the-scenes help from Ambarish) while Falco is working on the
> es2
> > pipeline. Iv'e also taken upon me to do the Java side modifications.
> >
> >  From the 3d3 pipeline perspective, it seems that this change will
> require
> > upgrading the shader models from 2.0 to 3.0. This means that backwards
> > compatibility is lost for graphic cards that support DirectX 9.0 but not
> > 9.0c. Fortunately, these should be a small number of very old cards.
> >
> > On the API level, I'm thinking about adding 4 `DoubleProperty`s to
> > PointLight for the 3 attenuation factors and the range. Their default
> > values are such that current behavior is preserved. SpotLight will also
> > have these values (in addition to other required parameters).
> >
> > If this plan is approved by Kevin/Johan, I will create JBS tickets for
> > step-by-step implementations. Other comments are welcome.
> >
> > Thanks,
> > Nir
> >
> > [1] https://github.com/javafxports/openjdk-jfx/issues/256
> > [2]
> >
> https://github.com/javafxports/openjdk-jfx/issues/256#issuecomment-450762358
>
>


More information about the openjfx-discuss mailing list