public Shader generateShader(String definesSourceCode) {
        if (techniqueDef == null) {
            throw new UnsupportedOperationException("The shaderGenerator was not "
                    + "properly initialized, call "
                    + "initialize(TechniqueDef) before any generation");
        }

        String techniqueName = techniqueDef.getName();
        ShaderGenerationInfo info = techniqueDef.getShaderGenerationInfo();

        Shader shader = new Shader();
        for (ShaderType type : ShaderType.values()) {
            String extension = type.getExtension();
            String language = getLanguageAndVersion(type);
            String shaderSourceCode = buildShader(techniqueDef.getShaderNodes(), info, type);

            if (shaderSourceCode != null) {
                String shaderSourceAssetName = techniqueName + "." + extension;
                shader.addSource(type, shaderSourceAssetName, shaderSourceCode, definesSourceCode, language);
            }
        }

        techniqueDef = null;
        return shader;
    }
Generate vertex and fragment shaders for the given technique

@param definesSourceCode (may be null)
@return a Shader program
jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java