protected int findShaderIndexFromVersion(ShaderNode shaderNode, ShaderType type) throws NumberFormatException {
        int index = 0;
        List<String> lang = shaderNode.getDefinition().getShadersLanguage();
        int genVersion = Integer.parseInt(getLanguageAndVersion(type).substring(4));
        int curVersion = 0;
        for (int i = 0; i < lang.size(); i++) {
            int version = Integer.parseInt(lang.get(i).substring(4));
            if (version > curVersion && version <= genVersion) {
                curVersion = version;
                index = i;
            }
        }
        return index;
    }
Returns the shader-path index according to the version of the generator.
This allows selecting the highest version of the shader that the generator
can handle.

@param shaderNode the shaderNode being processed
@param type the shaderType
@return the index of the shader path in ShaderNodeDefinition shadersPath
list
@throws NumberFormatException for an invalid version
jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java