Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 13 ■ 3D MoDel ShaDer Creation: USing the JavaFX 9 phongMaterial ClaSS

sphere.setRotate( 5 );
sphere.setMaterial(phongMaterial);


Figure 13-18 shows the Run ➤ Project Java code testing work process with the self-illumination
mapping on all three primitives. The white areas have turned into light sources, with the colored areas still
showing the diffuse and specular mapping characteristics. There seems to be a bit of a problem with the
anti-aliasing algorithm portion of the selfIlluminationMap property code, as you can see on the perimeter
edges of the Sphere primitive.


Figure 13-18. The self-illumination map turns white area on 3D primitives into a light source, leaving color
areas alone


Figure 13-17. Add the SelfIlluminationMap Image reference to the shader pipeline to control self-illumination
intensity

Free download pdf