private String moveExtensionsUp(StringBuilder sourceDeclaration) {
        Matcher m = extensions.matcher(sourceDeclaration.toString());
        StringBuilder finalSource = new StringBuilder();
        while (m.find()) {
            finalSource.append(m.group());
        }
        finalSource.append(m.replaceAll(""));
        return finalSource.toString();
    }
parses the source and moves all the extensions at the top of the shader source as having extension declarations
in the middle of a shader is against the specs and not supported by all drivers.
@param sourceDeclaration
@return
jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java