@Override
    public Object load(AssetInfo info) throws IOException {
        // The input stream provided is for the vertex shader,
        // to retrieve the fragment shader, use the content manager
        this.assetManager = info.getManager();
        InputStream in = info.openStream();
        in = Preprocessor.apply(in);
        Reader reader = new InputStreamReader(in);
        boolean injectDependencies = true;
        if (info.getKey() instanceof ShaderAssetKey) {
            injectDependencies = ((ShaderAssetKey) info.getKey()).isInjectDependencies();
        }
        if (info.getKey().getExtension().equals("glsllib")||info.getKey().getExtension().equals("glsl")) {
            // NOTE: Loopback, GLSLLIB is loaded by this loader
            // and needs data as InputStream
            return reader;
        } else {
            ShaderDependencyNode rootNode = loadNode(reader, "[main]");
            StringBuilder extensions = new StringBuilder();
            if (injectDependencies) {
                String code = resolveDependencies(rootNode, new HashSet<ShaderDependencyNode>(), extensions, injectDependencies);
                extensions.append(code);
                dependCache.clear();
                return extensions.toString();
            } else {
                Map<String, String> files = new LinkedHashMap<>();
                HashSet<ShaderDependencyNode> dependencies = new HashSet<>();
                String code = resolveDependencies(rootNode, dependencies, extensions, injectDependencies);
                extensions.append(code);
                files.put("[main]", extensions.toString());

                for (ShaderDependencyNode dependency : dependencies) {
                    files.put(dependency.getName(), dependency.getSource());
                }

                dependCache.clear();
                return files;
            }
        }
    }
Creates a {@link ShaderDependencyNode} from a stream representing shader code.

@param reader   the reader with shader code
@param nodeName the node name.
@return the shader dependency node
@throws AssetLoadException if we failed to load the shader code.
jme3-core/src/plugins/java/com/jme3/shader/plugins/GLSLLoader.java