@Override
            public void onAction(String name, boolean isPressed, float tpf) {

                if (name.equals("rup") && isPressed) {
                    roughness = FastMath.clamp(roughness + 0.1f, 0.0f, 1.0f);
                    m.setFloat("Roughness", roughness);
                }
                if (name.equals("rdown") && isPressed) {
                    roughness = FastMath.clamp(roughness - 0.1f, 0.0f, 1.0f);
                    m.setFloat("Roughness", roughness);
                }

                if (name.equals("light") && isPressed) {
                    dl.setDirection(cam.getDirection().normalize());
                }
            }
A test case for PBR lighting.
Still experimental.

@author nehon
jme3-examples/src/main/java/jme3test/light/pbr/TestPBRDirectLighting.java