@SuppressWarnings("unchecked")
    protected void generateDeclarationAndMainBody(List<ShaderNode> shaderNodes, StringBuilder sourceDeclaration, StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type) {
        for (ShaderNode shaderNode : shaderNodes) {
            if (info.getUnusedNodes().contains(shaderNode.getName())) {
                continue;
            }
            if (shaderNode.getDefinition().getType() == type) {
                int index = findShaderIndexFromVersion(shaderNode, type);
                String shaderPath = shaderNode.getDefinition().getShadersPath().get(index);
                Map<String, String> sources = (Map<String, String>) assetManager.loadAsset(new ShaderAssetKey(shaderPath, false));
                String loadedSource = sources.get("[main]");
                for (String name : sources.keySet()) {
                    if (!name.equals("[main]")) {
                        imports.put(name, sources.get(name));
                    }
                }
                appendNodeDeclarationAndMain(loadedSource, sourceDeclaration, source, shaderNode, info, shaderPath);
            }
        }
    }
iterates through shader nodes to load them and generate the shader
declaration part and main body extracted from the shader nodes, for the
given shader type

@param shaderNodes the list of shader nodes
@param sourceDeclaration the declaration part StringBuilder of the shader
to generate
@param source the main part StringBuilder of the shader to generate
@param info the ShaderGenerationInfo
@param type the Shader type
jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java