protected String updateDefinesName(String nodeSource, ShaderNode shaderNode) {
        String[] lines = nodeSource.split("\\n");
        ConditionParser parser = new ConditionParser();
        for (String line : lines) {

            if (line.trim().startsWith("#if")) {
                List<String> params = parser.extractDefines(line.trim());
                String l = line.trim().replaceAll("defined", "").replaceAll("#if ", "").replaceAll("#ifdef", "");//parser.getFormattedExpression();
                boolean match = false;
                for (String param : params) {
                    for (VariableMapping map : shaderNode.getInputMapping()) {
                        if ((map.getLeftVariable().getName()).equals(param)) {
                            if (map.getCondition() != null) {
                                l = l.replaceAll(param, map.getCondition());
                                match = true;
                            }
                        }
                    }
                }
                if (match) {
                    nodeSource = nodeSource.replace(line.trim(), "#if " + l);
                }
            }
        }
        return nodeSource;
    }
transforms defines name is the shader node code.
One can use a #if defined(inputVariableName) in a shaderNode code.
This method is responsible for changing the variable name with the 
appropriate defined based on the mapping condition of this variable.
Complex condition syntax are handled.     

@param nodeSource the shaderNode source code
@param shaderNode the ShaderNode being processed
@return the modified shaderNode source.
jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java