Emissive component for PhongMaterial

Nir Lisker nlisker at gmail.com
Sat Apr 13 17:07:50 UTC 2019

This might not be as simple as I thought. Even though adding the
self-illumination color naively works, I suspect I need to add new blend
modes for the combinations of the self-illumination color and the map. That
is, in D3DPhongShader.h, 'SelfIlllumTotal = 2' should be replaced with an
enum and get the same treatment the specular component gets. This means the
number of pixelShaders doubles and many blending combinations (the
ShaderFunction functions) are added, which need to be generated via the
build.gradle file.

Is this correct?

On Wed, Apr 10, 2019 at 1:54 PM Kevin Rushforth <kevin.rushforth at oracle.com>

> Hi Nir,
> It seems like a straight-forward addition. On the one hand, an
> application can use the self-illumination map to accomplish the same
> thing. However, a separate emissive color does allow changing it without
> creating a new 1x1 image each time, and makes it possible to combine a
> self-illumination map with a modulating emissive color without combining
> the two in the application, so I can see it being a nice convenience.
> Presuming there is no measurable performance hit, this seems fine to me.
> -- Kevin
> On 4/10/2019 3:01 AM, Nir Lisker wrote:
> > Hi Johan/Kevin,
> >
> > Iv'e submitted an issue for adding an emissive component to PhongMaterial
> > [1].
> > This component is the single-color counterpart of the self-illumination
> > map. It functions the same way as diffuse color is to diffuse map and
> > specular color is to specular map.
> > Emissive colors are used to simulate an object giving off light since
> they
> > do not interact with external lighting.
> >
> > Implementation will consist of simple changes to both 3D rendering
> > pipelines.
> >
> > Please evaluate,
> > Nir
> >
> > [1] https://bugs.openjdk.java.net/browse/JDK-8221720

More information about the openjfx-discuss mailing list