Merge branch 'master' into fs_emboss
# Conflicts: # src/libslic3r/CMakeLists.txt # src/libslic3r/Format/3mf.cpp # src/libslic3r/Model.hpp # src/libslic3r/Point.hpp # src/libslic3r/Technologies.hpp # src/slic3r/CMakeLists.txt # src/slic3r/GUI/GLCanvas3D.cpp # src/slic3r/GUI/GLSelectionRectangle.cpp # src/slic3r/GUI/GUI_Factories.hpp # src/slic3r/GUI/Gizmos/GLGizmoBase.cpp # src/slic3r/GUI/Gizmos/GLGizmoBase.hpp # src/slic3r/GUI/Gizmos/GLGizmoMove.cpp # src/slic3r/GUI/Gizmos/GLGizmoMove.hpp # src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp # src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp # src/slic3r/GUI/MeshUtils.cpp # src/slic3r/GUI/MeshUtils.hpp # src/slic3r/GUI/ObjectDataViewModel.cpp # src/slic3r/GUI/ObjectDataViewModel.hpp # src/slic3r/GUI/Selection.cpp
|
@ -27,13 +27,13 @@ option(SLIC3R_STATIC "Compile PrusaSlicer with static libraries (Boost, TBB,
|
|||
option(SLIC3R_GUI "Compile PrusaSlicer with GUI components (OpenGL, wxWidgets)" 1)
|
||||
option(SLIC3R_FHS "Assume PrusaSlicer is to be installed in a FHS directory structure" 0)
|
||||
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
|
||||
option(SLIC3R_PROFILE "Compile PrusaSlicer with an invasive Shiny profiler" 0)
|
||||
option(SLIC3R_PCH "Use precompiled headers" 1)
|
||||
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
|
||||
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1)
|
||||
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
|
||||
option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0)
|
||||
option(SLIC3R_UBSAN "Enable UBSan on Clang and GCC" 0)
|
||||
option(SLIC3R_ENABLE_FORMAT_STEP "Enable compilation of STEP file support" 1)
|
||||
# If SLIC3R_FHS is 1 -> SLIC3R_DESKTOP_INTEGRATION is always 0, othrewise variable.
|
||||
CMAKE_DEPENDENT_OPTION(SLIC3R_DESKTOP_INTEGRATION "Allow perfoming desktop integration during runtime" 1 "NOT SLIC3R_FHS" 0)
|
||||
|
||||
|
@ -327,25 +327,6 @@ add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
|
|||
# Disable unsafe implicit wxString to const char* / std::string and vice versa. This implicit conversion breaks the UTF-8 encoding quite often.
|
||||
add_definitions(-DwxNO_UNSAFE_WXSTRING_CONV)
|
||||
|
||||
if (SLIC3R_PROFILE)
|
||||
message("PrusaSlicer will be built with a Shiny invasive profiler")
|
||||
add_definitions(-DSLIC3R_PROFILE)
|
||||
endif ()
|
||||
|
||||
# Disable optimization even with debugging on.
|
||||
if (0)
|
||||
message(STATUS "Perl compiled without optimization. Disabling optimization for the PrusaSlicer build.")
|
||||
message("Old CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
message("Old CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
message("Old CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
|
||||
set(CMAKE_CXX_FLAGS "/MD /Od /Zi /EHsc /DWIN32 /DTBB_USE_ASSERT")
|
||||
set(CMAKE_C_FLAGS "/MD /Od /Zi /DWIN32 /DTBB_USE_ASSERT")
|
||||
endif()
|
||||
|
||||
# Find and configure boost
|
||||
if(SLIC3R_STATIC)
|
||||
# Use static boost libraries.
|
||||
|
|
6
deps/CMakeLists.txt
vendored
|
@ -75,6 +75,9 @@ function(prusaslicer_add_cmake_project projectname)
|
|||
if (MSVC)
|
||||
set(_gen CMAKE_GENERATOR "${DEP_MSVC_GEN}" CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}")
|
||||
set(_build_j "/m")
|
||||
if (${projectname} STREQUAL "OCCT")
|
||||
set(_build_j "/m:1")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(
|
||||
|
@ -188,7 +191,9 @@ endif ()
|
|||
|
||||
include(JPEG/JPEG.cmake)
|
||||
include(TIFF/TIFF.cmake)
|
||||
include(NanoSVG/NanoSVG.cmake)
|
||||
include(wxWidgets/wxWidgets.cmake)
|
||||
include(OCCT/OCCT.cmake)
|
||||
|
||||
set(_dep_list
|
||||
dep_Boost
|
||||
|
@ -201,6 +206,7 @@ set(_dep_list
|
|||
dep_OpenCSG
|
||||
dep_CGAL
|
||||
dep_Qhull
|
||||
dep_OCCT
|
||||
${PNG_PKG}
|
||||
${ZLIB_PKG}
|
||||
${EXPAT_PKG}
|
||||
|
|
4
deps/GLEW/GLEW.cmake
vendored
|
@ -4,8 +4,8 @@ find_package(OpenGL QUIET REQUIRED)
|
|||
|
||||
prusaslicer_add_cmake_project(
|
||||
GLEW
|
||||
URL https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip
|
||||
URL_HASH SHA256=2700383d4de2455f06114fbaf872684f15529d4bdc5cdea69b5fb0e9aa7763f1
|
||||
URL https://sourceforge.net/projects/glew/files/glew/2.2.0/glew-2.2.0.zip
|
||||
URL_HASH SHA256=a9046a913774395a095edcc0b0ac2d81c3aacca61787b39839b941e9be14e0d4
|
||||
SOURCE_SUBDIR build/cmake
|
||||
CMAKE_ARGS
|
||||
-DBUILD_UTILS=OFF
|
||||
|
|
4
deps/NanoSVG/NanoSVG.cmake
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
prusaslicer_add_cmake_project(NanoSVG
|
||||
URL https://github.com/memononen/nanosvg/archive/4c8f0139b62c6e7faa3b67ce1fbe6e63590ed148.zip
|
||||
URL_HASH SHA256=584e084af1a75bf633f79753ce2f6f6ec8686002ca27f35f1037c25675fecfb6
|
||||
)
|
27
deps/OCCT/OCCT.cmake
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
prusaslicer_add_cmake_project(OCCT
|
||||
#LMBBS: changed version to 7.6.2
|
||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_2.zip
|
||||
URL_HASH SHA256=c696b923593e8c18d059709717dbf155b3e72fdd283c8522047a790ec3a432c5
|
||||
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/occt_toolkit.cmake ./adm/cmake/
|
||||
CMAKE_ARGS
|
||||
-DINSTALL_DIR_LAYOUT=Unix # LMBBS
|
||||
-DBUILD_LIBRARY_TYPE=Static
|
||||
-DUSE_TK=OFF
|
||||
-DUSE_TBB=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_VTK=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DBUILD_MODULE_ApplicationFramework=OFF
|
||||
#-DBUILD_MODULE_DataExchange=OFF
|
||||
-DBUILD_MODULE_Draw=OFF
|
||||
-DBUILD_MODULE_FoundationClasses=OFF
|
||||
-DBUILD_MODULE_ModelingAlgorithms=OFF
|
||||
-DBUILD_MODULE_ModelingData=OFF
|
||||
-DBUILD_MODULE_Visualization=OFF
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_OCCT)
|
||||
endif ()
|
453
deps/OCCT/occt_toolkit.cmake
vendored
Normal file
|
@ -0,0 +1,453 @@
|
|||
# script for each OCCT toolkit
|
||||
|
||||
# filling some variables by default values(src) or using custom(tools, samples)
|
||||
set (RELATIVE_SOURCES_DIR "${RELATIVE_DIR}")
|
||||
if ("${RELATIVE_SOURCES_DIR}" STREQUAL "")
|
||||
#if it is not defined, use default directory
|
||||
set (RELATIVE_SOURCES_DIR "src")
|
||||
endif()
|
||||
|
||||
set (OCC_MODULES_LIST "${MODULES_LIST}")
|
||||
if ("${OCC_MODULES_LIST}" STREQUAL "")
|
||||
set (OCC_MODULES_LIST ${OCCT_MODULES})
|
||||
endif()
|
||||
|
||||
set (OCC_TARGET_FOLDER "${TARGET_FOLDER}")
|
||||
if ("${OCC_TARGET_FOLDER}" STREQUAL "")
|
||||
set (OCC_TARGET_FOLDER "Modules")
|
||||
endif()
|
||||
|
||||
set (OCCT_TOOLKITS_NAME_SUFFIX "${TOOLKITS_NAME_SUFFIX}")
|
||||
if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "")
|
||||
set (OCCT_TOOLKITS_NAME_SUFFIX "TOOLKITS")
|
||||
endif()
|
||||
|
||||
# parse PACKAGES file
|
||||
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
if ("${USED_PACKAGES}" STREQUAL "")
|
||||
set (USED_PACKAGES ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
if (USE_QT)
|
||||
# Qt dependencies
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
|
||||
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
|
||||
include_directories("${PROJECT_INCLUDES}")
|
||||
endif(USE_QT)
|
||||
|
||||
set (PRECOMPILED_DEFS)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
|
||||
if (WIN32 AND NOT EXECUTABLE_PROJECT)
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_STATIC_BUILD")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Get all used packages from toolkit
|
||||
UNSET(RESOURCE_FILES)
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
|
||||
#remove part after "/" in the OCCT_PACKAGE variable if exists
|
||||
string (FIND "${OCCT_PACKAGE}" "/" _index)
|
||||
if (_index GREATER -1)
|
||||
math (EXPR _index "${_index}")
|
||||
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
|
||||
else()
|
||||
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE_NAME}_DLL")
|
||||
endif()
|
||||
|
||||
set (SOURCE_FILES)
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${BUILD_YACCLEX})
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||
|
||||
# bison files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||
|
||||
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
|
||||
|
||||
list (SORT SOURCE_FILES_FLEX)
|
||||
list (SORT SOURCE_FILES_BISON)
|
||||
|
||||
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
|
||||
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
|
||||
|
||||
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
|
||||
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
|
||||
|
||||
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
|
||||
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
|
||||
|
||||
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
|
||||
|
||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||
|
||||
# Note: files are generated in original source directory (not in patch!)
|
||||
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}")
|
||||
|
||||
# choose appropriate extension for generated files: "cxx" if source file contains
|
||||
# instruction to generate C++ code, "c" otherwise
|
||||
set (BISON_OUTPUT_FILE_EXT "c")
|
||||
set (FLEX_OUTPUT_FILE_EXT "c")
|
||||
file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT)
|
||||
foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT})
|
||||
string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE})
|
||||
if (CXX_BISON_LANGUAGE_FOUND)
|
||||
set (BISON_OUTPUT_FILE_EXT "cxx")
|
||||
endif()
|
||||
endforeach()
|
||||
file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT)
|
||||
foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT})
|
||||
string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE})
|
||||
if (CXX_FLEX_LANGUAGE_FOUND)
|
||||
set (FLEX_OUTPUT_FILE_EXT "cxx")
|
||||
|
||||
# install copy of FlexLexer.h locally to allow further building without flex
|
||||
if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${FLEX_BISON_TARGET_DIR}/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
|
||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT})
|
||||
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}"
|
||||
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}"
|
||||
COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
|
||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header files
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
|
||||
if(APPLE)
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
|
||||
endif()
|
||||
|
||||
foreach(HEADER_FILE ${HEADER_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
else()
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
else()
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (USE_QT)
|
||||
FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES)
|
||||
#message("Qt Resource files are: ${QT_RESOURCE_FILES} in ${OCCT_PACKAGE}")
|
||||
endif(USE_QT)
|
||||
|
||||
#message("Resource files are: ${RESOURCE_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach(RESOURCE_FILE ${RESOURCE_FILES})
|
||||
SOURCE_GROUP ("Resource Files\\${OCCT_PACKAGE_NAME}" FILES "${RESOURCE_FILE}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_RCFILE "")
|
||||
if (MSVC)
|
||||
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
|
||||
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
foreach (OCCT_MODULE ${OCC_MODULES_LIST})
|
||||
list (FIND ${OCCT_MODULE}_${OCCT_TOOLKITS_NAME_SUFFIX} ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
|
||||
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
set (CURRENT_MODULE ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (MSVC)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
if (USE_QT)
|
||||
FIND_AND_WRAP_MOC_FILES("${USED_INCFILES}" "${PROJECT_NAME}_MOC_FILES")
|
||||
#message("MOC files: ${${PROJECT_NAME}_MOC_FILES}")
|
||||
endif (USE_QT)
|
||||
|
||||
if (EXECUTABLE_PROJECT)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.wasm DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
if (MSVC)
|
||||
if (BUILD_FORCE_RelWithDebInfo)
|
||||
set (aReleasePdbConf "Release")
|
||||
else()
|
||||
set (aReleasePdbConf)
|
||||
endif()
|
||||
# install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
||||
# CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
|
||||
# DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
|
||||
if (NOT WIN32)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}")
|
||||
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "${OCC_TARGET_FOLDER}/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
|
||||
if (APPLE)
|
||||
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
|
||||
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
||||
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
||||
|
||||
if (ANDROID)
|
||||
# do not append version to the filename
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
else()
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||
endif()
|
||||
|
||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
|
||||
# parse EXTERNLIB file
|
||||
if (CUSTOM_EXTERNLIB)
|
||||
set (USED_EXTERNLIB_AND_TOOLKITS ${CUSTOM_EXTERNLIB})
|
||||
else()
|
||||
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
|
||||
endif()
|
||||
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
||||
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
|
||||
if (NOT COMMENT_FOUND)
|
||||
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
|
||||
string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
|
||||
|
||||
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
|
||||
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
|
||||
OCCT_INSTALL_VTK(${USED_ITEM})
|
||||
endif()
|
||||
else()
|
||||
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
|
||||
if ("${CSF_FOUND}" STREQUAL "")
|
||||
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
|
||||
else() # get CSF_ value
|
||||
set (CURRENT_CSF ${${USED_ITEM}})
|
||||
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
|
||||
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs")
|
||||
add_definitions (-DHAVE_OPENGL)
|
||||
endif()
|
||||
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs")
|
||||
add_definitions (-DHAVE_GLES2)
|
||||
endif()
|
||||
|
||||
set (LIBRARY_FROM_CACHE 0)
|
||||
separate_arguments (CURRENT_CSF)
|
||||
foreach (CSF_LIBRARY ${CURRENT_CSF})
|
||||
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
|
||||
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
|
||||
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
|
||||
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
|
||||
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
|
||||
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
|
||||
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
|
||||
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
|
||||
|
||||
if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
|
||||
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
|
||||
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
|
||||
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
|
||||
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
||||
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
||||
NOT "x${IS_ENDING}" STREQUAL "x" OR
|
||||
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}")
|
||||
set (LIBRARY_FROM_CACHE 1)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (NOT ${LIBRARY_FROM_CACHE})
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (APPLE)
|
||||
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
||||
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
||||
find_package (X11 COMPONENTS X11)
|
||||
if (NOT X11_FOUND)
|
||||
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
|
||||
# Add VTK_OPENGL2_BACKEND definition.
|
||||
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2" OR IS_VTK_9XX)
|
||||
add_definitions(-DVTK_OPENGL2_BACKEND)
|
||||
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
|
||||
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
|
||||
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
|
||||
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
|
||||
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
|
||||
if(VTK_MAJOR_VERSION GREATER 6)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
if(VTK_MAJOR_VERSION EQUAL 6 AND VTK_MINOR_VERSION GREATER 2 OR VTK_MAJOR_VERSION GREATER 6)
|
||||
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL" IS_VTK_RENDER_FREETYPE_FOUND)
|
||||
if (NOT ${IS_VTK_RENDER_FREETYPE_FOUND} EQUAL -1)
|
||||
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
|
||||
if(IS_VTK_9XX)
|
||||
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
|
||||
endif()
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
endif()
|
||||
|
||||
if (USE_QT)
|
||||
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
|
||||
target_link_libraries (${PROJECT_NAME} debug ${PROJECT_LIBRARY_DEBUG})
|
||||
endforeach()
|
||||
foreach (PROJECT_LIBRARY_RELEASE ${PROJECT_LIBRARIES_RELEASE})
|
||||
target_link_libraries (${PROJECT_NAME} optimized ${PROJECT_LIBRARY_RELEASE})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# suppress deprecation warnings inside OCCT itself for old gcc versions with unavailable Standard_DISABLE_DEPRECATION_WARNINGS
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.0)
|
||||
add_definitions("-DOCCT_NO_DEPRECATED")
|
||||
message (STATUS "Warning: internal deprecation warnings by Standard_DEPRECATED have been disabled due to old gcc version being used")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# use Cotire to accelerate build via usage of precompiled headers
|
||||
if (BUILD_USE_PCH)
|
||||
if (WIN32)
|
||||
# prevent definition of min and max macros through inclusion of Windows.h
|
||||
# (for cotire builds)
|
||||
add_definitions("-DNOMINMAX")
|
||||
# avoid warnings on deprecated names from standard C library (see strsafe.h)
|
||||
add_definitions("-DSTRSAFE_NO_DEPRECATE")
|
||||
# avoid "std::Equal1" warning in QANCollection_Stl.cxx in debug mode
|
||||
# suggesting using msvc "Checked Iterators"
|
||||
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
|
||||
# Exclude system-provided glext.h.
|
||||
# These macros are already defined within OpenGl_GlFunctions.hxx,
|
||||
# however we have to duplicate them here for building TKOpenGl with PCH.
|
||||
add_definitions("-DGL_GLEXT_LEGACY")
|
||||
add_definitions("-DGLX_GLXEXT_LEGACY")
|
||||
|
||||
# workaround for old gcc
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions("-D__STDC_CONSTANT_MACROS")
|
||||
add_definitions("-D__STDC_FORMAT_MACROS")
|
||||
endif()
|
||||
|
||||
# unity builds are not used since they do not add speed but cause conflicts
|
||||
# in TKV3d
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
||||
|
||||
cotire(${PROJECT_NAME})
|
||||
endif()
|
15
deps/wxWidgets/wxWidgets.cmake
vendored
|
@ -1,5 +1,3 @@
|
|||
set(_wx_git_tag v3.1.4-patched)
|
||||
|
||||
set(_wx_toolkit "")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_gtk_ver 2)
|
||||
|
@ -15,11 +13,9 @@ if (UNIX AND NOT APPLE) # wxWidgets will not use char as the underlying type for
|
|||
endif()
|
||||
|
||||
prusaslicer_add_cmake_project(wxWidgets
|
||||
# GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
|
||||
# GIT_TAG tm_cross_compile #${_wx_git_tag}
|
||||
URL https://github.com/prusa3d/wxWidgets/archive/489f6118256853cf5b299d595868641938566cdb.zip
|
||||
URL_HASH SHA256=5b22d465377cedd8044bba69bea958b248953fd3628c1de4913a84d4e6f6175b
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
|
||||
URL https://github.com/prusa3d/wxWidgets/archive/2a0b365df947138c513a888d707d46248d78a341.zip
|
||||
URL_HASH SHA256=9ab05cd5179196fad4ae702c78eaae9418e73a402cfd390f7438e469b13eb735
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG dep_NanoSVG
|
||||
CMAKE_ARGS
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
|
@ -32,13 +28,16 @@ prusaslicer_add_cmake_project(wxWidgets
|
|||
-DwxUSE_OPENGL=ON
|
||||
-DwxUSE_LIBPNG=sys
|
||||
-DwxUSE_ZLIB=sys
|
||||
-DwxUSE_REGEX=builtin
|
||||
-DwxUSE_NANOSVG=sys
|
||||
-DwxUSE_NANOSVG_EXTERNAL=ON
|
||||
-DwxUSE_REGEX=OFF
|
||||
-DwxUSE_LIBXPM=builtin
|
||||
-DwxUSE_LIBJPEG=sys
|
||||
-DwxUSE_LIBTIFF=sys
|
||||
-DwxUSE_EXPAT=sys
|
||||
-DwxUSE_LIBSDL=OFF
|
||||
-DwxUSE_XTEST=OFF
|
||||
-DwxUSE_GLCANVAS_EGL=OFF
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
* miniz: No packages, author suggests using in the source tree
|
||||
* qhull: libqhull-dev does not contain libqhullcpp => link errors. Until it is fixed, we will use the builtin version. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925540
|
||||
* semver: One module C library, author expects to use clib for installation. No packages.
|
||||
* Shiny: no packages
|
||||
|
||||
## Header only
|
||||
* igl
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
min_slic3r_version = 2.5.0-alpha0
|
||||
0.2.1 Added Ender 3 Neo and Ender 3 S1 Plus. Various updates.
|
||||
0.2.0 Added alternative nozzle support
|
||||
0.1.5 Added Ender-3 S1 Pro
|
||||
min_slic3r_version = 2.4.1
|
||||
0.1.4 Added Ender-3 Pro. Added M25 support for some printers.
|
||||
|
|
BIN
resources/profiles/Creality/CR10SMARTPRO_thumbnail.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
resources/profiles/Creality/ENDER3MAXNEO_thumbnail.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
resources/profiles/Creality/ENDER3NEO_thumbnail.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
resources/profiles/Creality/ENDER3S1PLUS_thumbnail.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
resources/profiles/Creality/ENDER3V2NEO_thumbnail.png
Normal file
After Width: | Height: | Size: 34 KiB |
2
resources/profiles/Elegoo.idx
Normal file
|
@ -0,0 +1,2 @@
|
|||
min_slic3r_version = 2.5.0-alpha3
|
||||
1.0.0 Initial version
|
510
resources/profiles/Elegoo.ini
Normal file
|
@ -0,0 +1,510 @@
|
|||
# PrusaSlicer print profiles for the Elegoo printers.
|
||||
# By Andrew Suzuki (andrewsuzuki.com), adapted from Creality.ini
|
||||
|
||||
[vendor]
|
||||
# Vendor name will be shown by the Config Wizard.
|
||||
name = Elegoo
|
||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
||||
config_version = 1.0.0
|
||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Elegoo/
|
||||
|
||||
# The printer models will be shown by the Configuration Wizard in this order,
|
||||
# also the first model installed & the first nozzle installed will be activated after install.
|
||||
# Printer model name will be shown by the installation wizard.
|
||||
|
||||
[printer_model:NEPTUNE1]
|
||||
name = Elegoo Neptune-1
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
[printer_model:NEPTUNE2]
|
||||
name = Elegoo Neptune-2
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
[printer_model:NEPTUNE2D]
|
||||
name = Elegoo Neptune-2D
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
[printer_model:NEPTUNE2S]
|
||||
name = Elegoo Neptune-2S
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
[printer_model:NEPTUNE3]
|
||||
name = Elegoo Neptune-3
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
[printer_model:NEPTUNEX]
|
||||
name = Elegoo Neptune-X
|
||||
variants = 0.4
|
||||
technology = FFF
|
||||
family = NEPTUNE
|
||||
bed_model =
|
||||
bed_texture =
|
||||
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
|
||||
|
||||
# All presets starting with asterisk, for example *common*, are intermediate and they will
|
||||
# not make it into the user interface.
|
||||
|
||||
# Common print preset
|
||||
[print:*common*]
|
||||
avoid_crossing_perimeters = 0
|
||||
bridge_angle = 0
|
||||
bridge_flow_ratio = 0.95
|
||||
bridge_speed = 25
|
||||
brim_width = 0
|
||||
clip_multipart_objects = 1
|
||||
compatible_printers =
|
||||
complete_objects = 0
|
||||
dont_support_bridges = 1
|
||||
elefant_foot_compensation = 0.1
|
||||
ensure_vertical_shell_thickness = 1
|
||||
external_fill_pattern = rectilinear
|
||||
external_perimeters_first = 0
|
||||
external_perimeter_extrusion_width = 0.45
|
||||
external_perimeter_speed = 25
|
||||
extra_perimeters = 0
|
||||
extruder_clearance_height = 25
|
||||
extruder_clearance_radius = 45
|
||||
extrusion_width = 0.45
|
||||
fill_angle = 45
|
||||
fill_density = 20%
|
||||
fill_pattern = grid
|
||||
first_layer_extrusion_width = 0.42
|
||||
first_layer_height = 0.2
|
||||
first_layer_speed = 20
|
||||
gap_fill_speed = 30
|
||||
gcode_comments = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
infill_extrusion_width = 0.45
|
||||
infill_first = 0
|
||||
infill_only_where_needed = 0
|
||||
infill_overlap = 25%
|
||||
infill_speed = 50
|
||||
interface_shells = 0
|
||||
max_print_speed = 100
|
||||
max_volumetric_extrusion_rate_slope_negative = 0
|
||||
max_volumetric_extrusion_rate_slope_positive = 0
|
||||
max_volumetric_speed = 0
|
||||
min_skirt_length = 4
|
||||
notes =
|
||||
overhangs = 0
|
||||
only_retract_when_crossing_perimeters = 0
|
||||
ooze_prevention = 0
|
||||
output_filename_format = {input_filename_base}_{layer_height}mm_{filament_type[0]}_{printer_model}_{print_time}.gcode
|
||||
perimeters = 2
|
||||
perimeter_extruder = 1
|
||||
perimeter_extrusion_width = 0.45
|
||||
perimeter_speed = 40
|
||||
post_process =
|
||||
print_settings_id =
|
||||
raft_layers = 0
|
||||
resolution = 0
|
||||
seam_position = nearest
|
||||
single_extruder_multi_material_priming = 0
|
||||
skirts = 1
|
||||
skirt_distance = 2
|
||||
skirt_height = 2
|
||||
small_perimeter_speed = 25
|
||||
solid_infill_below_area = 0
|
||||
solid_infill_every_layers = 0
|
||||
solid_infill_extruder = 1
|
||||
solid_infill_extrusion_width = 0.45
|
||||
solid_infill_speed = 40
|
||||
spiral_vase = 0
|
||||
standby_temperature_delta = -5
|
||||
support_material = 0
|
||||
support_material_extruder = 0
|
||||
support_material_extrusion_width = 0.38
|
||||
support_material_interface_extruder = 0
|
||||
support_material_angle = 0
|
||||
support_material_buildplate_only = 0
|
||||
support_material_enforce_layers = 0
|
||||
support_material_contact_distance = 0.15
|
||||
support_material_interface_contact_loops = 0
|
||||
support_material_interface_layers = 2
|
||||
support_material_interface_spacing = 0.2
|
||||
support_material_interface_speed = 100%
|
||||
support_material_pattern = rectilinear
|
||||
support_material_spacing = 2
|
||||
support_material_speed = 40
|
||||
support_material_synchronize_layers = 0
|
||||
support_material_threshold = 45
|
||||
support_material_with_sheath = 0
|
||||
support_material_xy_spacing = 60%
|
||||
thin_walls = 0
|
||||
top_infill_extrusion_width = 0.4
|
||||
top_solid_infill_speed = 30
|
||||
travel_speed = 150
|
||||
wipe_tower = 0
|
||||
wipe_tower_bridging = 10
|
||||
wipe_tower_rotation_angle = 0
|
||||
wipe_tower_width = 60
|
||||
wipe_tower_x = 170
|
||||
wipe_tower_y = 140
|
||||
xy_size_compensation = 0
|
||||
|
||||
[print:*0.08mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.08
|
||||
perimeters = 3
|
||||
bottom_solid_layers = 9
|
||||
top_solid_layers = 11
|
||||
|
||||
[print:*0.10mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.1
|
||||
perimeters = 3
|
||||
bottom_solid_layers = 7
|
||||
top_solid_layers = 9
|
||||
|
||||
[print:*0.12mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.12
|
||||
perimeters = 3
|
||||
bottom_solid_layers = 6
|
||||
top_solid_layers = 7
|
||||
|
||||
[print:*0.16mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.16
|
||||
bottom_solid_layers = 5
|
||||
top_solid_layers = 7
|
||||
|
||||
[print:*0.20mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.20
|
||||
bottom_solid_layers = 4
|
||||
top_solid_layers = 5
|
||||
|
||||
[print:*0.24mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.24
|
||||
top_infill_extrusion_width = 0.45
|
||||
bottom_solid_layers = 3
|
||||
top_solid_layers = 4
|
||||
|
||||
[print:*0.28mm*]
|
||||
inherits = *common*
|
||||
layer_height = 0.28
|
||||
top_infill_extrusion_width = 0.45
|
||||
bottom_solid_layers = 3
|
||||
top_solid_layers = 4
|
||||
|
||||
[print:0.08mm SUPERDETAIL @ELEGOO]
|
||||
inherits = *0.08mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.10mm HIGHDETAIL @ELEGOO]
|
||||
inherits = *0.10mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.12mm DETAIL @ELEGOO]
|
||||
inherits = *0.12mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.16mm OPTIMAL @ELEGOO]
|
||||
inherits = *0.16mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.20mm NORMAL @ELEGOO]
|
||||
inherits = *0.20mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.24mm DRAFT @ELEGOO]
|
||||
inherits = *0.24mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
[print:0.28mm SUPERDRAFT @ELEGOO]
|
||||
inherits = *0.28mm*
|
||||
compatible_printers_condition = printer_model=~/(NEPTUNE).*/ and nozzle_diameter[0]==0.4
|
||||
|
||||
# When submitting new filaments please print the following temperature tower at 0.1mm layer height:
|
||||
# https://www.thingiverse.com/thing:2615842
|
||||
# Pay particular attention to bridging, overhangs and retractions.
|
||||
# Also print the following bed adhesion test at 0.1 layer height as well:
|
||||
# https://www.prusaprinters.org/prints/4634-bed-adhesion-warp-test
|
||||
# At least for PLA, please keep bed temp at 60, as many Elegoo printers do not have any ABL
|
||||
# So having some leeway to get good bed adhesion is not a luxury for many users
|
||||
|
||||
[filament:*common*]
|
||||
cooling = 0
|
||||
compatible_printers =
|
||||
extrusion_multiplier = 1
|
||||
filament_cost = 0
|
||||
filament_density = 0
|
||||
filament_diameter = 1.75
|
||||
filament_notes = ""
|
||||
filament_settings_id = ""
|
||||
filament_soluble = 0
|
||||
min_print_speed = 15
|
||||
slowdown_below_layer_time = 20
|
||||
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_ELEGOO.*/
|
||||
|
||||
[filament:*PLA*]
|
||||
inherits = *common*
|
||||
bed_temperature = 60
|
||||
fan_below_layer_time = 100
|
||||
filament_colour = #DDDDDD
|
||||
filament_max_volumetric_speed = 15
|
||||
filament_type = PLA
|
||||
filament_density = 1.24
|
||||
filament_cost = 20
|
||||
first_layer_bed_temperature = 60
|
||||
first_layer_temperature = 210
|
||||
fan_always_on = 1
|
||||
cooling = 1
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
bridge_fan_speed = 100
|
||||
disable_fan_first_layers = 1
|
||||
temperature = 205
|
||||
|
||||
[filament:*PET*]
|
||||
inherits = *common*
|
||||
bed_temperature = 70
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 3
|
||||
fan_below_layer_time = 20
|
||||
filament_colour = #DDDDDD
|
||||
filament_max_volumetric_speed = 8
|
||||
filament_type = PETG
|
||||
filament_density = 1.27
|
||||
filament_cost = 20
|
||||
first_layer_bed_temperature = 70
|
||||
first_layer_temperature = 240
|
||||
fan_always_on = 1
|
||||
max_fan_speed = 50
|
||||
min_fan_speed = 20
|
||||
bridge_fan_speed = 100
|
||||
temperature = 240
|
||||
|
||||
[filament:*ABS*]
|
||||
inherits = *common*
|
||||
bed_temperature = 100
|
||||
cooling = 0
|
||||
disable_fan_first_layers = 3
|
||||
fan_below_layer_time = 20
|
||||
filament_colour = #DDDDDD
|
||||
filament_max_volumetric_speed = 11
|
||||
filament_type = ABS
|
||||
filament_density = 1.04
|
||||
filament_cost = 20
|
||||
first_layer_bed_temperature = 100
|
||||
first_layer_temperature = 245
|
||||
fan_always_on = 0
|
||||
max_fan_speed = 0
|
||||
min_fan_speed = 0
|
||||
bridge_fan_speed = 30
|
||||
top_fan_speed = 0
|
||||
temperature = 245
|
||||
|
||||
[filament:Generic PLA @ELEGOO]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Generic
|
||||
|
||||
[filament:Generic PETG @ELEGOO]
|
||||
inherits = *PET*
|
||||
filament_vendor = Generic
|
||||
|
||||
[filament:Generic ABS @ELEGOO]
|
||||
inherits = *ABS*
|
||||
first_layer_bed_temperature = 90
|
||||
bed_temperature = 90
|
||||
filament_vendor = Generic
|
||||
|
||||
# Common printer preset
|
||||
[printer:*common*]
|
||||
printer_technology = FFF
|
||||
before_layer_gcode = ;BEFORE_LAYER_CHANGE\nG92 E0\n;[layer_z]\n\n
|
||||
bed_shape = 0x0,235x0,235x235,0x235
|
||||
between_objects_gcode =
|
||||
pause_print_gcode =
|
||||
deretract_speed = 0
|
||||
extruder_colour = #FCE94F
|
||||
extruder_offset = 0x0
|
||||
gcode_flavor = marlin
|
||||
silent_mode = 0
|
||||
remaining_times = 0
|
||||
machine_max_acceleration_e = 5000
|
||||
machine_max_acceleration_extruding = 500
|
||||
machine_max_acceleration_retracting = 1000
|
||||
machine_max_acceleration_x = 500
|
||||
machine_max_acceleration_y = 500
|
||||
machine_max_acceleration_z = 100
|
||||
machine_max_feedrate_e = 60
|
||||
machine_max_feedrate_x = 500
|
||||
machine_max_feedrate_y = 500
|
||||
machine_max_feedrate_z = 10
|
||||
machine_max_jerk_e = 5
|
||||
machine_max_jerk_x = 8
|
||||
machine_max_jerk_y = 8
|
||||
machine_max_jerk_z = 0.4
|
||||
machine_min_extruding_rate = 0
|
||||
machine_min_travel_rate = 0
|
||||
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
|
||||
max_layer_height = 0.3
|
||||
min_layer_height = 0.07
|
||||
max_print_height = 250
|
||||
nozzle_diameter = 0.4
|
||||
printer_notes =
|
||||
printer_settings_id =
|
||||
retract_before_travel = 1
|
||||
retract_before_wipe = 0%
|
||||
retract_layer_change = 1
|
||||
retract_length = 1
|
||||
retract_length_toolchange = 1
|
||||
retract_lift = 0
|
||||
retract_lift_above = 0
|
||||
retract_lift_below = 0
|
||||
retract_restart_extra = 0
|
||||
retract_restart_extra_toolchange = 0
|
||||
retract_speed = 35
|
||||
single_extruder_multi_material = 0
|
||||
thumbnails = 16x16,220x124
|
||||
toolchange_gcode =
|
||||
use_firmware_retraction = 0
|
||||
use_relative_e_distances = 1
|
||||
use_volumetric_e = 0
|
||||
variable_layer_height = 1
|
||||
wipe = 1
|
||||
z_offset = 0
|
||||
printer_model =
|
||||
default_print_profile = 0.16mm OPTIMAL @ELEGOO
|
||||
default_filament_profile = Generic PLA @ELEGOO
|
||||
|
||||
[printer:Elegoo Neptune-2]
|
||||
inherits = *common*
|
||||
printer_model = NEPTUNE2
|
||||
printer_variant = 0.4
|
||||
max_layer_height = 0.28
|
||||
min_layer_height = 0.08
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2\nPRINTER_HAS_BOWDEN
|
||||
max_print_height = 250
|
||||
machine_max_acceleration_e = 5000
|
||||
machine_max_acceleration_extruding = 500
|
||||
machine_max_acceleration_retracting = 1000
|
||||
machine_max_acceleration_x = 500
|
||||
machine_max_acceleration_y = 500
|
||||
machine_max_acceleration_z = 100
|
||||
machine_max_feedrate_e = 60
|
||||
machine_max_feedrate_x = 500
|
||||
machine_max_feedrate_y = 500
|
||||
machine_max_feedrate_z = 10
|
||||
machine_max_jerk_e = 5
|
||||
machine_max_jerk_x = 8
|
||||
machine_max_jerk_y = 8
|
||||
machine_max_jerk_z = 0.4
|
||||
machine_min_extruding_rate = 0
|
||||
machine_min_travel_rate = 0
|
||||
nozzle_diameter = 0.4
|
||||
retract_before_travel = 2
|
||||
retract_length = 5
|
||||
retract_speed = 60
|
||||
deretract_speed = 40
|
||||
retract_before_wipe = 70%
|
||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
|
||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
|
||||
|
||||
|
||||
# Intended for printers with a smaller bed
|
||||
# [printer:*fastabl*]
|
||||
# start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
|
||||
|
||||
# Intended for printers with a larger bed
|
||||
# [printer:*slowabl*]
|
||||
# start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
|
||||
|
||||
# Intended for printers with vendor official firmware verified to support M25
|
||||
# [printer:*pauseprint*]
|
||||
# pause_print_gcode = M25 ; pause print
|
||||
|
||||
# Intended for printers where the Z-axis lowers the print bed during printing
|
||||
# [printer:*invertedz*]
|
||||
# end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600{endif} ; Move print bed down\nG1 X50 Y50 F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed down further down\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
|
||||
|
||||
# Intended for printers with dual extruders and a single hotend/nozzle
|
||||
[printer:*dualextruder*]
|
||||
single_extruder_multi_material = 1
|
||||
cooling_tube_length = 23
|
||||
cooling_tube_retraction = 35
|
||||
extra_loading_move = -2
|
||||
parking_pos_retraction = 80
|
||||
deretract_speed = 40,40
|
||||
extruder_colour = #0080C0;#FFFF9F
|
||||
extruder_offset = 0x0,0x0
|
||||
max_layer_height = 0.28,0.28
|
||||
min_layer_height = 0.08,0.08
|
||||
nozzle_diameter = 0.4,0.4
|
||||
retract_before_travel = 2,2
|
||||
retract_before_wipe = 70%,70%
|
||||
retract_layer_change = 1,1
|
||||
retract_length = 5,5
|
||||
retract_length_toolchange = 1,1
|
||||
retract_lift = 0,0
|
||||
retract_lift_above = 0,0
|
||||
retract_lift_below = 0,0
|
||||
retract_restart_extra = 0,0
|
||||
retract_restart_extra_toolchange = 0,0
|
||||
retract_speed = 60,60
|
||||
wipe = 1,1
|
||||
start_gcode = T[initial_tool] ; set active extruder\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\n;G29 ; auto bed levelling - remove ; at beginning of line to enable\n;M420 S1 ; enable mesh - remove ; at beginning of line to enable\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240 ; move down to prime nozzle\nG92 E0 ; reset extruder\nG1 E90 ; load filament\nG92 E0 ; reset extruder\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000 ; move over for second prime line\nG92 E0 ; reset extruder\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0 ; reset extruder
|
||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} ; present print\nG1 E-80 F2000 ; unload filament\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
|
||||
|
||||
# Copy of Creality CR-X config for the Neptune 2D (dual extruder, single hotend)
|
||||
|
||||
[printer:Elegoo Neptune-2D]
|
||||
inherits = Elegoo Neptune-2; *dualextruder*
|
||||
retract_length = 6,6
|
||||
printer_model = NEPTUNE2D
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
|
||||
|
||||
[printer:Elegoo Neptune-2S]
|
||||
inherits = Elegoo Neptune-2
|
||||
printer_model = NEPTUNE2S
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
|
||||
|
||||
[printer:Elegoo Neptune-X]
|
||||
inherits = Elegoo Neptune-2
|
||||
max_print_height = 300
|
||||
printer_model = NEPTUNEX
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
|
||||
|
||||
[printer:Elegoo Neptune-3]
|
||||
inherits = Elegoo Neptune-2
|
||||
max_print_height = 280
|
||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; run abl mesh\nM420 S1 ; load mesh\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
|
||||
printer_model = NEPTUNE3
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
|
||||
|
||||
[printer:Elegoo Neptune-1]
|
||||
inherits = Elegoo Neptune-2
|
||||
bed_shape = 0x0,210x0,210x210,0x210
|
||||
max_print_height = 200
|
||||
printer_model = NEPTUNE1
|
||||
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
|
BIN
resources/profiles/Elegoo/NEPTUNE1_thumbnail.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
resources/profiles/Elegoo/NEPTUNE2D_thumbnail.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
resources/profiles/Elegoo/NEPTUNE2S_thumbnail.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
resources/profiles/Elegoo/NEPTUNE2_thumbnail.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
resources/profiles/Elegoo/NEPTUNE3_thumbnail.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
resources/profiles/Elegoo/NEPTUNEX_thumbnail.png
Normal file
After Width: | Height: | Size: 37 KiB |
|
@ -1,6 +1,10 @@
|
|||
min_slic3r_version = 2.5.0-alpha0
|
||||
1.5.1 Renamed filament type "NYLON" to "PA". Updated Adura X profile. Updated PETG fan settings for Prusa MINI (removed fan ramp up).
|
||||
1.5.0 Updated arachne parameters. Added profiles for Jessie filaments.
|
||||
1.5.0-alpha1 Added filament profile for Prusament PA11 Carbon Fiber. Added profiles for multiple 3D-Fuel filaments.
|
||||
1.5.0-alpha0 Added parameters for Arachne perimeter generator. Changed default seam position. Updated output filename format.
|
||||
min_slic3r_version = 2.4.0-rc
|
||||
1.4.7 Added filament profile for Prusament PA11 Carbon Fiber. Added profiles for multiple 3D-Fuel filaments.
|
||||
1.4.6 Added SLA materials. Updated filament profiles.
|
||||
1.4.5 Added MMU2/S profiles for 0.25mm nozzle. Updated FW version. Enabled g-code thumbnails for MK3 family printers. Updated end g-code.
|
||||
1.4.4 Added multiple Fiberlogy filament profiles. Updated Extrudr filament profiles.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
name = Prusa Research
|
||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
||||
config_version = 1.5.0-alpha0
|
||||
config_version = 1.5.1
|
||||
# Where to get the updates from?
|
||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/
|
||||
changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
||||
|
@ -30,7 +30,7 @@ technology = FFF
|
|||
family = MK3
|
||||
bed_model = mk3_bed.stl
|
||||
bed_texture = mk3.svg
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB; Prusament PA11 Carbon Fiber
|
||||
|
||||
[printer_model:MK3]
|
||||
name = Original Prusa i3 MK3
|
||||
|
@ -39,7 +39,7 @@ technology = FFF
|
|||
family = MK3
|
||||
bed_model = mk3_bed.stl
|
||||
bed_texture = mk3.svg
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB; Prusament PA11 Carbon Fiber
|
||||
|
||||
[printer_model:MK3SMMU2S]
|
||||
name = Original Prusa i3 MK3S && MK3S+ MMU2S
|
||||
|
@ -66,7 +66,7 @@ technology = FFF
|
|||
family = MK2.5
|
||||
bed_model = mk3_bed.stl
|
||||
bed_texture = mk3.svg
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB; Prusament PA11 Carbon Fiber @MK2
|
||||
|
||||
[printer_model:MK2.5]
|
||||
name = Original Prusa i3 MK2.5
|
||||
|
@ -75,7 +75,7 @@ technology = FFF
|
|||
family = MK2.5
|
||||
bed_model = mk3_bed.stl
|
||||
bed_texture = mk3.svg
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB; Prusament PA11 Carbon Fiber @MK2
|
||||
|
||||
[printer_model:MK2.5SMMU2S]
|
||||
name = Original Prusa i3 MK2.5S MMU2S
|
||||
|
@ -102,7 +102,7 @@ technology = FFF
|
|||
family = MK2
|
||||
bed_model = mk2_bed.stl
|
||||
bed_texture = mk2.svg
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB
|
||||
default_materials = Generic PLA; Generic ABS; Generic PETG; Prusament PLA; Prusament PETG; Prusament ASA; Prusament PC Blend; Prusament PC Blend Carbon Fiber; Prusament PVB; Prusament PA11 Carbon Fiber @MK2
|
||||
|
||||
[printer_model:MK2SMM]
|
||||
name = Original Prusa i3 MK2S MMU1
|
||||
|
@ -243,14 +243,11 @@ bottom_solid_min_thickness = 0.5
|
|||
gcode_label_objects = 1
|
||||
infill_anchor = 2.5
|
||||
infill_anchor_max = 12
|
||||
wall_add_middle_threshold = 75%
|
||||
wall_split_middle_threshold = 50%
|
||||
wall_transition_angle = 10
|
||||
wall_transition_filter_deviation = 25%
|
||||
wall_transition_length = 0.4
|
||||
wall_distribution_count = 1
|
||||
min_bead_width = 85%
|
||||
min_feature_size = 0.1
|
||||
|
||||
[print:*MK3*]
|
||||
fill_pattern = grid
|
||||
|
@ -297,14 +294,11 @@ thick_bridges = 0
|
|||
bridge_flow_ratio = 1
|
||||
bridge_speed = 20
|
||||
wipe_tower_bridging = 6
|
||||
wall_add_middle_threshold = 85%
|
||||
wall_split_middle_threshold = 70%
|
||||
wall_transition_angle = 10
|
||||
wall_transition_filter_deviation = 25%
|
||||
wall_transition_length = 0.25
|
||||
wall_distribution_count = 1
|
||||
min_bead_width = 85%
|
||||
min_feature_size = 0.0625
|
||||
|
||||
[print:*0.25nozzleMK3*]
|
||||
inherits = *0.25nozzle*
|
||||
|
@ -353,14 +347,11 @@ bottom_solid_min_thickness = 0.6
|
|||
thick_bridges = 1
|
||||
bridge_flow_ratio = 0.95
|
||||
bridge_speed = 25
|
||||
wall_add_middle_threshold = 85%
|
||||
wall_split_middle_threshold = 70%
|
||||
wall_transition_angle = 10
|
||||
wall_transition_filter_deviation = 25%
|
||||
wall_transition_length = 0.6
|
||||
wall_distribution_count = 1
|
||||
min_bead_width = 85%
|
||||
min_feature_size = 0.15
|
||||
|
||||
[print:*0.6nozzleMK3*]
|
||||
inherits = *0.6nozzle*
|
||||
|
@ -422,14 +413,11 @@ bottom_solid_min_thickness = 0.8
|
|||
single_extruder_multi_material_priming = 0
|
||||
thick_bridges = 1
|
||||
overhangs = 0
|
||||
wall_add_middle_threshold = 85%
|
||||
wall_split_middle_threshold = 70%
|
||||
wall_transition_angle = 10
|
||||
wall_transition_filter_deviation = 25%
|
||||
wall_transition_length = 0.8
|
||||
wall_distribution_count = 1
|
||||
min_bead_width = 85%
|
||||
min_feature_size = 0.2
|
||||
|
||||
[print:*soluble_support*]
|
||||
overhangs = 1
|
||||
|
@ -926,6 +914,7 @@ top_solid_infill_speed = 40
|
|||
fill_pattern = gyroid
|
||||
fill_density = 15%
|
||||
perimeters = 3
|
||||
wipe_tower_bridging = 5
|
||||
|
||||
[print:0.15mm QUALITY @MK3]
|
||||
inherits = *0.15mm*; *MK3*
|
||||
|
@ -1620,9 +1609,9 @@ filament_retract_lift = 0.2
|
|||
compatible_printers_condition = printer_model=="MK2SMM"
|
||||
|
||||
[filament:*PETMINI*]
|
||||
# inherits = *PET*
|
||||
full_fan_speed_layer = 0
|
||||
filament_retract_length = nil
|
||||
filament_retract_speed = 40
|
||||
filament_retract_speed = 45
|
||||
filament_deretract_speed = 25
|
||||
filament_retract_lift = nil
|
||||
filament_retract_before_travel = 1
|
||||
|
@ -1631,9 +1620,9 @@ compatible_printers_condition = printer_model=="MINI"
|
|||
start_filament_gcode = "M900 K{if nozzle_diameter[0]==0.6}0.12{elsif nozzle_diameter[0]==0.8}0.06{else}0.2{endif} ; Filament gcode"
|
||||
|
||||
[filament:*PETMINI06*]
|
||||
# inherits = *PET*
|
||||
full_fan_speed_layer = 0
|
||||
filament_retract_length = nil
|
||||
filament_retract_speed = 40
|
||||
filament_retract_speed = 45
|
||||
filament_deretract_speed = 25
|
||||
filament_retract_lift = nil
|
||||
filament_retract_before_travel = 1
|
||||
|
@ -1642,7 +1631,6 @@ start_filament_gcode = "M900 K0.12 ; Filament gcode"
|
|||
filament_max_volumetric_speed = 13
|
||||
|
||||
[filament:*ABSMINI*]
|
||||
# inherits = *ABS*
|
||||
bed_temperature = 100
|
||||
first_layer_bed_temperature = 100
|
||||
filament_retract_length = 2.7
|
||||
|
@ -2057,6 +2045,28 @@ disable_fan_first_layers = 6
|
|||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and printer_notes=~/.*PRINTER_MODEL_MK(2|2.5).*/ and ! (printer_notes=~/.*PRINTER_MODEL_MK2.5.*/ and single_extruder_multi_material)
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.02{elsif nozzle_diameter[0]==0.6}0.04{else}0.07{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K24{elsif nozzle_diameter[0]==0.8};{else}M900 K45{endif} ; Filament gcode LA 1.0"
|
||||
|
||||
[filament:Prusament PA11 Carbon Fiber]
|
||||
inherits = Prusament PC Blend Carbon Fiber
|
||||
filament_cost = 151.24
|
||||
filament_density = 1.11
|
||||
filament_type = PA
|
||||
filament_max_volumetric_speed = 6.5
|
||||
extrusion_multiplier = 1.05
|
||||
first_layer_temperature = 275
|
||||
temperature = 285
|
||||
first_layer_bed_temperature = 90
|
||||
bed_temperature = 115
|
||||
fan_below_layer_time = 10
|
||||
compatible_printers_condition = printer_notes!~/.*PRINTER_MODEL_MK(2|2.5).*/ and nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and printer_model!="MINI" and ! single_extruder_multi_material
|
||||
|
||||
[filament:Prusament PA11 Carbon Fiber @MK2]
|
||||
inherits = Prusament PA11 Carbon Fiber
|
||||
first_layer_bed_temperature = 90
|
||||
bed_temperature = 110
|
||||
disable_fan_first_layers = 6
|
||||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and printer_notes=~/.*PRINTER_MODEL_MK(2|2.5).*/ and ! (printer_notes=~/.*PRINTER_MODEL_MK2.5.*/ and single_extruder_multi_material)
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.02{elsif nozzle_diameter[0]==0.6}0.04{else}0.07{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K24{elsif nozzle_diameter[0]==0.8};{else}M900 K45{endif} ; Filament gcode LA 1.0"
|
||||
|
||||
[filament:Fillamentum CPE]
|
||||
inherits = *PET*
|
||||
filament_vendor = Fillamentum
|
||||
|
@ -2376,10 +2386,10 @@ inherits = *PET*
|
|||
filament_vendor = addnorth
|
||||
filament_cost = 29.99
|
||||
filament_density = 1.27
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
extrusion_multiplier = 0.98
|
||||
bed_temperature = 60
|
||||
first_layer_bed_temperature = 60
|
||||
bed_temperature = 115
|
||||
first_layer_bed_temperature = 105
|
||||
first_layer_temperature = 265
|
||||
temperature = 270
|
||||
fan_always_on = 0
|
||||
|
@ -2396,7 +2406,7 @@ filament_retract_lift = 0.4
|
|||
filament_max_volumetric_speed = 4
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.02{elsif nozzle_diameter[0]==0.6}0.04{else}0.08{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K24{elsif nozzle_diameter[0]==0.8};{else}M900 K45{endif} ; Filament gcode LA 1.0"
|
||||
filament_spool_weight = 0
|
||||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_model!="MINI" and printer_model!="MK2SMM" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material)
|
||||
compatible_printers_condition = printer_notes!~/.*PRINTER_MODEL_MK(2|2.5).*/ and nozzle_diameter[0]>=0.4 and printer_model!="MINI" and printer_model!="MK2SMM" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material)
|
||||
|
||||
[filament:addnorth Adura X @MINI]
|
||||
inherits = addnorth Adura X
|
||||
|
@ -2404,14 +2414,24 @@ filament_retract_length = nil
|
|||
filament_retract_lift = nil
|
||||
filament_retract_speed = 40
|
||||
filament_deretract_speed = 25
|
||||
bed_temperature = 60
|
||||
first_layer_bed_temperature = 60
|
||||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_model=="MINI"
|
||||
|
||||
[filament:addnorth Adura X @MMU1]
|
||||
inherits = addnorth Adura X
|
||||
filament_retract_length = nil
|
||||
filament_retract_lift = nil
|
||||
bed_temperature = 60
|
||||
first_layer_bed_temperature = 60
|
||||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_model=="MK2SMM"
|
||||
|
||||
[filament:addnorth Adura X @MK2]
|
||||
inherits = addnorth Adura X
|
||||
bed_temperature = 110
|
||||
first_layer_bed_temperature = 105
|
||||
compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_notes=~/.*PRINTER_MODEL_MK(2|2.5).*/ and ! (printer_notes=~/.*PRINTER_MODEL_MK2.5.*/ and single_extruder_multi_material)
|
||||
|
||||
[filament:addnorth E-PLA]
|
||||
inherits = *PLA*
|
||||
filament_vendor = addnorth
|
||||
|
@ -2684,6 +2704,75 @@ filament_cost = 25.4
|
|||
filament_density = 1.24
|
||||
compatible_printers_condition = nozzle_diameter[0]!=0.8 and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material)
|
||||
|
||||
[filament:3D-Fuel Standard PLA]
|
||||
inherits = *PLA*
|
||||
filament_vendor = 3D-Fuel
|
||||
filament_cost = 22.14
|
||||
filament_density = 1.24
|
||||
filament_max_volumetric_speed = 10
|
||||
first_layer_temperature = 210
|
||||
temperature = 200
|
||||
|
||||
[filament:3D-Fuel EasiPrint PLA]
|
||||
inherits = 3D-Fuel Standard PLA
|
||||
filament_cost = 30.44
|
||||
|
||||
[filament:3D-Fuel Pro PLA]
|
||||
inherits = *PLA*
|
||||
filament_vendor = 3D-Fuel
|
||||
filament_cost = 26.57
|
||||
filament_density = 1.22
|
||||
filament_max_volumetric_speed = 12
|
||||
first_layer_temperature = 220
|
||||
temperature = 215
|
||||
filament_retract_lift = 0
|
||||
|
||||
[filament:3D-Fuel Buzzed]
|
||||
inherits = 3D-Fuel Standard PLA
|
||||
filament_cost = 44.27
|
||||
filament_retract_lift = 0
|
||||
first_layer_temperature = 210
|
||||
temperature = 195
|
||||
filament_max_volumetric_speed = 8
|
||||
|
||||
[filament:3D-Fuel Wound up]
|
||||
inherits = 3D-Fuel Buzzed
|
||||
filament_cost = 44.27
|
||||
filament_retract_lift = nil
|
||||
first_layer_temperature = 215
|
||||
temperature = 210
|
||||
filament_max_volumetric_speed = 8
|
||||
|
||||
[filament:3D-Fuel Workday ABS]
|
||||
inherits = *ABSC*
|
||||
filament_vendor = 3D-Fuel
|
||||
filament_cost = 23.25
|
||||
filament_density = 1.04
|
||||
|
||||
[filament:3D-Fuel Workday ABS @MINI]
|
||||
inherits = 3D-Fuel Workday ABS; *ABSMINI*
|
||||
|
||||
[filament:Jessie PLA]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Printed Solid
|
||||
filament_cost = 21
|
||||
filament_density = 1.24
|
||||
filament_max_volumetric_speed = 12
|
||||
|
||||
[filament:Jessie PETG]
|
||||
inherits = *PET*
|
||||
filament_vendor = Printed Solid
|
||||
filament_cost = 22
|
||||
filament_density = 1.27
|
||||
first_layer_temperature = 240
|
||||
first_layer_bed_temperature = 85
|
||||
temperature = 245
|
||||
bed_temperature = 90
|
||||
filament_max_volumetric_speed = 7
|
||||
|
||||
[filament:Jessie PETG @MINI]
|
||||
inherits = Jessie PETG; *PETMINI*
|
||||
|
||||
[filament:Devil Design PLA]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Devil Design
|
||||
|
@ -2941,7 +3030,7 @@ bed_temperature = 115
|
|||
fan_always_on = 0
|
||||
cooling = 0
|
||||
bridge_fan_speed = 25
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
filament_max_volumetric_speed = 8
|
||||
compatible_printers_condition = printer_notes!~/.*PRINTER_MODEL_MK(2|2.5).*/ and printer_model!="MINI" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material)
|
||||
|
||||
|
@ -4085,7 +4174,7 @@ filament_cost = 27.65
|
|||
|
||||
[filament:Fiberlogy Nylon PA12]
|
||||
inherits = Fiberlogy ASA
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
filament_density = 1.01
|
||||
filament_cost = 48
|
||||
first_layer_bed_temperature = 105
|
||||
|
@ -4318,7 +4407,7 @@ inherits = *common*
|
|||
filament_vendor = Taulman
|
||||
filament_cost = 40
|
||||
filament_density = 1.13
|
||||
bed_temperature = 90
|
||||
bed_temperature = 110
|
||||
bridge_fan_speed = 40
|
||||
cooling = 0
|
||||
disable_fan_first_layers = 3
|
||||
|
@ -4327,13 +4416,22 @@ fan_below_layer_time = 20
|
|||
filament_colour = #DEE0E6
|
||||
filament_max_volumetric_speed = 7
|
||||
filament_soluble = 0
|
||||
filament_type = NYLON
|
||||
first_layer_bed_temperature = 60
|
||||
first_layer_temperature = 240
|
||||
filament_type = PA
|
||||
first_layer_bed_temperature = 90
|
||||
first_layer_temperature = 260
|
||||
temperature = 260
|
||||
max_fan_speed = 0
|
||||
min_fan_speed = 0
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.02{elsif nozzle_diameter[0]==0.6}0.04{else}0.08{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K24{elsif nozzle_diameter[0]==0.8};{else}M900 K45{endif} ; Filament gcode LA 1.0"
|
||||
compatible_printers_condition = printer_model!="MINI" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material)
|
||||
|
||||
[filament:Taulman Bridge @MINI]
|
||||
inherits = Taulman Bridge
|
||||
bed_temperature = 90
|
||||
first_layer_bed_temperature = 60
|
||||
first_layer_temperature = 240
|
||||
temperature = 250
|
||||
compatible_printers_condition = printer_model=="MINI"
|
||||
|
||||
[filament:Fillamentum Nylon FX256]
|
||||
inherits = *common*
|
||||
|
@ -4352,7 +4450,7 @@ slowdown_below_layer_time = 20
|
|||
filament_colour = #DEE0E6
|
||||
filament_max_volumetric_speed = 6
|
||||
filament_soluble = 0
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
first_layer_bed_temperature = 90
|
||||
first_layer_temperature = 250
|
||||
max_fan_speed = 0
|
||||
|
@ -4365,10 +4463,10 @@ inherits = *common*
|
|||
filament_vendor = Fiberthree
|
||||
filament_cost = 200.84
|
||||
filament_density = 1.2
|
||||
bed_temperature = 70
|
||||
first_layer_bed_temperature = 75
|
||||
first_layer_temperature = 270
|
||||
temperature = 270
|
||||
bed_temperature = 90
|
||||
first_layer_bed_temperature = 90
|
||||
first_layer_temperature = 285
|
||||
temperature = 285
|
||||
bridge_fan_speed = 30
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 3
|
||||
|
@ -4379,7 +4477,7 @@ slowdown_below_layer_time = 10
|
|||
filament_colour = #DEE0E6
|
||||
filament_max_volumetric_speed = 5
|
||||
filament_soluble = 0
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
max_fan_speed = 20
|
||||
min_fan_speed = 20
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.6}0.04{else}0.05{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K18{elsif nozzle_diameter[0]==0.8};{else}M900 K30{endif} ; Filament gcode LA 1.0"
|
||||
|
@ -4395,10 +4493,10 @@ inherits = *common*
|
|||
filament_vendor = Fiberthree
|
||||
filament_cost = 208.1
|
||||
filament_density = 1.25
|
||||
bed_temperature = 70
|
||||
first_layer_bed_temperature = 75
|
||||
first_layer_temperature = 275
|
||||
temperature = 275
|
||||
bed_temperature = 90
|
||||
first_layer_bed_temperature = 90
|
||||
first_layer_temperature = 285
|
||||
temperature = 285
|
||||
bridge_fan_speed = 30
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 3
|
||||
|
@ -4409,7 +4507,7 @@ slowdown_below_layer_time = 10
|
|||
filament_colour = #DEE0E6
|
||||
filament_max_volumetric_speed = 5
|
||||
filament_soluble = 0
|
||||
filament_type = NYLON
|
||||
filament_type = PA
|
||||
max_fan_speed = 0
|
||||
min_fan_speed = 0
|
||||
start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.6}0.12{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/ and nozzle_diameter[0]==0.8}0.06{elsif printer_notes=~/.*PRINTER_MODEL_MINI.*/}0.2{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.6}0.04{else}0.05{endif} ; Filament gcode LA 1.5\n{if printer_notes=~/.*PRINTER_MODEL_MINI.*/};{elsif printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}M900 K200{elsif nozzle_diameter[0]==0.6}M900 K18{elsif nozzle_diameter[0]==0.8};{else}M900 K30{endif} ; Filament gcode LA 1.0"
|
||||
|
@ -4695,6 +4793,10 @@ compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]!=0.
|
|||
[filament:Fiberthree F3 PA Pure Pro @MINI]
|
||||
inherits = Fiberthree F3 PA Pure Pro
|
||||
filament_max_volumetric_speed = 4
|
||||
first_layer_temperature = 280
|
||||
temperature = 280
|
||||
first_layer_bed_temperature = 75
|
||||
bed_temperature = 70
|
||||
filament_retract_length = nil
|
||||
filament_retract_speed = nil
|
||||
filament_retract_lift = nil
|
||||
|
@ -4704,6 +4806,10 @@ compatible_printers_condition = printer_model=="MINI"
|
|||
|
||||
[filament:Fiberthree F3 PA-CF Pro @MINI]
|
||||
inherits = Fiberthree F3 PA-CF Pro
|
||||
first_layer_temperature = 280
|
||||
temperature = 280
|
||||
first_layer_bed_temperature = 75
|
||||
bed_temperature = 70
|
||||
filament_max_volumetric_speed = 4
|
||||
filament_retract_length = nil
|
||||
filament_retract_speed = nil
|
||||
|
@ -5083,6 +5189,16 @@ filament_max_volumetric_speed = 13
|
|||
filament_retract_lift = 0.25
|
||||
compatible_printers_condition = printer_notes!~/.*PRINTER_MODEL_MK(2|2.5).*/ and nozzle_diameter[0]==0.8 and printer_model!="MINI" and ! single_extruder_multi_material
|
||||
|
||||
[filament:Prusament PA11 Carbon Fiber @0.8 nozzle]
|
||||
inherits = Prusament PA11 Carbon Fiber
|
||||
filament_max_volumetric_speed = 11
|
||||
compatible_printers_condition = printer_notes!~/.*PRINTER_MODEL_MK(2|2.5).*/ and nozzle_diameter[0]==0.8 and printer_model!="MINI" and ! single_extruder_multi_material
|
||||
|
||||
[filament:Prusament PA11 Carbon Fiber @0.8 nozzle MK2]
|
||||
inherits = Prusament PA11 Carbon Fiber @MK2
|
||||
filament_max_volumetric_speed = 11
|
||||
compatible_printers_condition = nozzle_diameter[0]==0.8 and printer_model!="MK2SMM" and printer_notes=~/.*PRINTER_MODEL_MK(2|2.5).*/ and ! (printer_notes=~/.*PRINTER_MODEL_MK2.5.*/ and single_extruder_multi_material)
|
||||
|
||||
[filament:Prusament PC Blend @0.8 nozzle MK2]
|
||||
inherits = Prusament PC Blend @MK2
|
||||
filament_max_volumetric_speed = 13
|
||||
|
@ -8839,7 +8955,7 @@ inherits = Original Prusa i3 MK2S
|
|||
printer_model = MK2.5
|
||||
remaining_times = 1
|
||||
machine_max_jerk_e = 4.5
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
|
||||
|
||||
[printer:Original Prusa i3 MK2.5 0.25 nozzle]
|
||||
inherits = Original Prusa i3 MK2S 0.25 nozzle
|
||||
|
@ -8853,7 +8969,8 @@ inherits = Original Prusa i3 MK2S 0.6 nozzle
|
|||
printer_model = MK2.5
|
||||
remaining_times = 1
|
||||
machine_max_jerk_e = 4.5
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
|
||||
|
||||
[printer:Original Prusa i3 MK2.5 0.8 nozzle]
|
||||
inherits = Original Prusa i3 MK2S 0.6 nozzle
|
||||
|
@ -8862,10 +8979,13 @@ nozzle_diameter = 0.8
|
|||
printer_variant = 0.8
|
||||
max_layer_height = 0.6
|
||||
min_layer_height = 0.2
|
||||
retract_length = 1
|
||||
retract_length = 0.7
|
||||
retract_speed = 35
|
||||
deretract_speed = 20
|
||||
retract_lift = 0.25
|
||||
remaining_times = 1
|
||||
machine_max_jerk_e = 4.5
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||
|
@ -8939,7 +9059,10 @@ max_layer_height = 0.6
|
|||
min_layer_height = 0.2
|
||||
nozzle_diameter = 0.8
|
||||
printer_variant = 0.8
|
||||
retract_length = 1
|
||||
retract_length = 0.7
|
||||
retract_speed = 35
|
||||
deretract_speed = 20
|
||||
retract_lift = 0.25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
|
@ -8952,6 +9075,7 @@ max_layer_height = 0.35
|
|||
min_layer_height = 0.1
|
||||
nozzle_diameter = 0.6
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
default_print_profile = 0.20mm NORMAL @0.6 nozzle
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
||||
|
@ -8985,6 +9109,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
default_print_profile = 0.20mm NORMAL @0.6 nozzle
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
||||
|
@ -8994,6 +9119,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
default_print_profile = 0.20mm NORMAL @0.6 nozzle
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
||||
|
@ -9067,7 +9193,7 @@ remaining_times = 1
|
|||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
|
||||
retract_lift_below = 209
|
||||
max_print_height = 210
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||
printer_model = MK3
|
||||
default_print_profile = 0.15mm QUALITY @MK3
|
||||
thumbnails = 160x120
|
||||
|
@ -9089,7 +9215,8 @@ nozzle_diameter = 0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}
|
||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
||||
|
@ -9099,8 +9226,11 @@ nozzle_diameter = 0.8
|
|||
max_layer_height = 0.6
|
||||
min_layer_height = 0.2
|
||||
printer_variant = 0.8
|
||||
retract_length = 1
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S95
|
||||
retract_length = 0.7
|
||||
retract_speed = 35
|
||||
deretract_speed = 20
|
||||
retract_lift = 0.25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0\nM221 S95
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||
|
@ -9182,6 +9312,7 @@ nozzle_diameter = 0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
@ -9193,7 +9324,10 @@ nozzle_diameter = 0.8
|
|||
max_layer_height = 0.6
|
||||
min_layer_height = 0.2
|
||||
printer_variant = 0.8
|
||||
retract_length = 1
|
||||
retract_length = 0.7
|
||||
retract_speed = 35
|
||||
deretract_speed = 20
|
||||
retract_lift = 0.25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
|
@ -9235,6 +9369,7 @@ nozzle_diameter = 0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
@ -9246,7 +9381,10 @@ nozzle_diameter = 0.8
|
|||
max_layer_height = 0.6
|
||||
min_layer_height = 0.2
|
||||
printer_variant = 0.8
|
||||
retract_length = 1
|
||||
retract_length = 0.7
|
||||
retract_speed = 35
|
||||
deretract_speed = 20
|
||||
retract_lift = 0.25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
|
@ -9283,6 +9421,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
@ -9293,6 +9432,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||
max_layer_height = 0.40
|
||||
min_layer_height = 0.15
|
||||
printer_variant = 0.6
|
||||
deretract_speed = 25
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||
|
@ -9424,8 +9564,10 @@ max_layer_height = 0.55
|
|||
min_layer_height = 0.2
|
||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle MINI
|
||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||
retract_length = 3.5
|
||||
retract_length = 3
|
||||
retract_before_travel = 1.5
|
||||
retract_speed = 45
|
||||
deretract_speed = 20
|
||||
|
||||
[printer:Original Prusa SL1]
|
||||
printer_technology = SLA
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
min_slic3r_version = 2.4.0-alpha0
|
||||
1.0.1 Speed improvements, start gcode changes, added HIPS filament.
|
||||
1.0.0 Initial version
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# Print profiles for the gCreate printers.
|
||||
#
|
||||
# GTL Modified 210706 (at gCreate Shop)
|
||||
#
|
||||
# GTL Modified 220825 (at gCreate Shop)
|
||||
# Speed improvements, start/end gCode changes
|
||||
|
||||
[vendor]
|
||||
# Vendor name will be shown by the Config Wizard.
|
||||
name = gCreate
|
||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
||||
config_version = 1.0.0
|
||||
config_version = 1.0.1
|
||||
# Where to get the updates from?
|
||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/gCreate/
|
||||
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
||||
|
@ -548,6 +548,7 @@ compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_GCREATE.*/
|
|||
# Common filament preset across all PLA filaments
|
||||
[filament:*PLA*]
|
||||
inherits = *common*
|
||||
extrusion_multiplier = 0.94
|
||||
bed_temperature = 60
|
||||
fan_below_layer_time = 15
|
||||
filament_colour = #FF3232
|
||||
|
@ -749,11 +750,20 @@ filament_vendor = ProtoPasta
|
|||
temperature = 250
|
||||
bed_temperature = 70
|
||||
|
||||
[filament:Generic HIPS @GCREATE]
|
||||
inherits = *PET*
|
||||
filament_vendor = Generic
|
||||
filament_density = 1.04
|
||||
temperature = 230
|
||||
first_layer_temperature = 235
|
||||
bed_temperature = 100
|
||||
first_layer_bed_temperature = 100
|
||||
filament_type = HIPS
|
||||
|
||||
[filament:Generic TPU 90A @GCREATE]
|
||||
inherits = *TPU90A*
|
||||
filament_vendor = Generic
|
||||
|
||||
|
||||
[filament:Generic CF PETG @GCREATE]
|
||||
inherits = *CFPETG*
|
||||
filament_vendor = Generic
|
||||
|
@ -770,8 +780,6 @@ filament_vendor = Generic
|
|||
inherits = *WOODFILLPLA*
|
||||
filament_vendor = ColorFabb
|
||||
|
||||
|
||||
|
||||
[filament:Generic PVA @GCREATE - PLA and PVA Support]
|
||||
bed_temperature = 0
|
||||
bridge_fan_speed = 75
|
||||
|
@ -830,8 +838,8 @@ machine_max_feedrate_x = 500
|
|||
machine_max_feedrate_y = 500
|
||||
machine_max_feedrate_z = 10
|
||||
machine_max_jerk_e = 2.5
|
||||
machine_max_jerk_x = 3
|
||||
machine_max_jerk_y = 3
|
||||
machine_max_jerk_x = 10
|
||||
machine_max_jerk_y = 10
|
||||
machine_max_jerk_z = 0.4
|
||||
machine_min_extruding_rate = 0
|
||||
machine_min_travel_rate = 0
|
||||
|
@ -893,7 +901,7 @@ retract_speed = 70
|
|||
deretract_speed = 40
|
||||
retract_before_wipe = 70%
|
||||
default_print_profile = 0.20mm - Standard Layers @GCREATE
|
||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG92 E0.0
|
||||
start_gcode = M420 Z20\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG92 E0.0
|
||||
end_gcode = M104 S0 T0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
|
||||
|
||||
#[printer:*abl*]
|
||||
|
@ -906,6 +914,7 @@ printer_model = GMAX2PRO
|
|||
max_layer_height = 0.7
|
||||
min_layer_height = 0.08
|
||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_GCREATE\nPRINTER_MODEL_GMAX2PRO
|
||||
start_gcode = G90\nG28\nM420 Z20\nG1 Z5 F5000
|
||||
bed_shape = 0x0,457x0,457x457,0x457
|
||||
max_print_height = 610
|
||||
|
||||
|
@ -929,7 +938,7 @@ printer_model = GMAX2DUAL2IN1
|
|||
max_layer_height = 0.7
|
||||
min_layer_height = 0.08
|
||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_GCREATE\nPRINTER_MODEL_GMAX2DUAL2IN1
|
||||
start_gcode = G90 ;\n G28 ;\n G1 Z5 F5000
|
||||
start_gcode = G90\nG28\nM420 Z20\nG1 Z5 F5000
|
||||
bed_shape = 0x0,457x0,457x457,0x457
|
||||
max_print_height = 610
|
||||
default_print_profile = 0.20mm - Standard Layers @GCREATE
|
||||
|
@ -951,7 +960,7 @@ printer_model = GMAX2DUAL
|
|||
max_layer_height = 0.7
|
||||
min_layer_height = 0.08
|
||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_GCREATE\nPRINTER_MODEL_GMAX2DUAL
|
||||
start_gcode = G90\nG28\nG1 Z5 F5000\nM218 T1 X20 Y0 ; Set second extruder offset
|
||||
start_gcode = G90\nG28\nM420 Z20\nG1 Z5 F5000\nM218 T1 X20 Y0 ; Set second extruder offset
|
||||
end_gcode = M104 S0 T0 ; turn off temperature\nM104 S0 T1 ; turn off 2nd extruder\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
|
||||
bed_shape = 0x0,457x0,457x457,0x457
|
||||
max_print_height = 610
|
||||
|
|
|
@ -1,77 +1,77 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
eye_normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * v_normal)).z : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * v_normal)).z : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
}
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
// vertex attributes
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
// instance attributes
|
||||
attribute vec3 i_offset;
|
||||
attribute vec2 i_scales;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
|
||||
vec4 eye_position = view_model_matrix * world_position;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * eye_position;
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
// vertex attributes
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
// instance attributes
|
||||
attribute vec3 i_offset;
|
||||
attribute vec2 i_scales;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
|
||||
vec4 eye_position = view_model_matrix * world_position;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * eye_position;
|
||||
}
|
||||
|
|
|
@ -1,63 +1,63 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
const float EPSILON = 0.0001;
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
uniform bool volume_mirrored;
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying vec4 model_pos;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
vec3 color = uniform_color.rgb;
|
||||
float alpha = uniform_color.a;
|
||||
|
||||
vec3 triangle_normal = normalize(cross(dFdx(model_pos.xyz), dFdy(model_pos.xyz)));
|
||||
#ifdef FLIP_TRIANGLE_NORMALS
|
||||
triangle_normal = -triangle_normal;
|
||||
#endif
|
||||
|
||||
if (volume_mirrored)
|
||||
triangle_normal = -triangle_normal;
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(normal_matrix * triangle_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
vec2 intensity = vec2(0.0);
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec3 position = (view_model_matrix * model_pos).xyz;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
const float EPSILON = 0.0001;
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
uniform bool volume_mirrored;
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying vec4 model_pos;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
vec3 color = uniform_color.rgb;
|
||||
float alpha = uniform_color.a;
|
||||
|
||||
vec3 triangle_normal = normalize(cross(dFdx(model_pos.xyz), dFdy(model_pos.xyz)));
|
||||
#ifdef FLIP_TRIANGLE_NORMALS
|
||||
triangle_normal = -triangle_normal;
|
||||
#endif
|
||||
|
||||
if (volume_mirrored)
|
||||
triangle_normal = -triangle_normal;
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(view_normal_matrix * triangle_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
vec2 intensity = vec2(0.0);
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec3 position = (view_model_matrix * model_pos).xyz;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
}
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
varying vec3 world_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
world_position = v_position;
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
varying vec3 world_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
world_position = v_position;
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform float object_max_z;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
attribute vec2 v_tex_coord;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying float object_z;
|
||||
|
||||
void main()
|
||||
{
|
||||
// =====================================================
|
||||
// NOTE:
|
||||
// when object_max_z > 0.0 we are rendering the overlay
|
||||
// when object_max_z == 0.0 we are rendering the volumes
|
||||
// =====================================================
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = (object_max_z > 0.0) ? vec3(0.0, 0.0, 1.0) : normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular)
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Scaled to widths of the Z texture.
|
||||
object_z = (object_max_z > 0.0) ? object_max_z * v_tex_coord.y : (volume_world_matrix * vec4(v_position, 1.0)).z;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 110
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform float object_max_z;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
attribute vec2 v_tex_coord;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying float object_z;
|
||||
|
||||
void main()
|
||||
{
|
||||
// =====================================================
|
||||
// NOTE:
|
||||
// when object_max_z > 0.0 we are rendering the overlay
|
||||
// when object_max_z == 0.0 we are rendering the volumes
|
||||
// =====================================================
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = (object_max_z > 0.0) ? vec3(0.0, 0.0, 1.0) : normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular)
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Scaled to widths of the Z texture.
|
||||
object_z = (object_max_z > 0.0) ? object_max_z * v_tex_coord.y : (volume_world_matrix * vec4(v_position, 1.0)).z;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ uniform vec4 bottom_color;
|
|||
|
||||
in vec2 tex_coord;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = mix(bottom_color, top_color, tex_coord.y);
|
||||
out_color = mix(bottom_color, top_color, tex_coord.y);
|
||||
}
|
||||
|
|
34
resources/shaders/140/dashed_thick_lines.fs
Normal file
|
@ -0,0 +1,34 @@
|
|||
#version 150
|
||||
|
||||
// see as reference: https://github.com/mhalber/Lines/blob/master/geometry_shader_lines.h
|
||||
// https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
||||
|
||||
const float aa_radius = 0.5;
|
||||
|
||||
uniform float dash_size;
|
||||
uniform float gap_size;
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
in float line_width;
|
||||
// x = v tex coord, y = s coord
|
||||
in vec2 seg_params;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
float inv_stride = 1.0 / (dash_size + gap_size);
|
||||
if (gap_size > 0.0 && fract(seg_params.y * inv_stride) > dash_size * inv_stride)
|
||||
discard;
|
||||
|
||||
// We render a quad that is fattened by r, giving total width of the line to be w+r. We want smoothing to happen
|
||||
// around w, so that the edge is properly smoothed out. As such, in the smoothstep function we have:
|
||||
// Far edge : 1.0 = (w+r) / (w+r)
|
||||
// Close edge : 1.0 - (2r / (w+r)) = (w+r)/(w+r) - 2r/(w+r)) = (w-r) / (w+r)
|
||||
// This way the smoothing is centered around 'w'.
|
||||
|
||||
out_color = uniform_color;
|
||||
float inv_line_width = 1.0 / line_width;
|
||||
float aa = 1.0 - smoothstep(1.0 - (2.0 * aa_radius * inv_line_width), 1.0, abs(seg_params.x * inv_line_width));
|
||||
out_color.a *= aa;
|
||||
}
|
50
resources/shaders/140/dashed_thick_lines.gs
Normal file
|
@ -0,0 +1,50 @@
|
|||
#version 150
|
||||
|
||||
// see as reference: https://github.com/mhalber/Lines/blob/master/geometry_shader_lines.h
|
||||
// https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
||||
|
||||
layout(lines) in;
|
||||
layout(triangle_strip, max_vertices = 4) out;
|
||||
|
||||
const float aa_radius = 0.5;
|
||||
|
||||
uniform vec2 viewport_size;
|
||||
uniform float width;
|
||||
|
||||
in float coord_s[];
|
||||
|
||||
out float line_width;
|
||||
// x = v tex coord, y = s coord
|
||||
out vec2 seg_params;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 ndc_0 = gl_in[0].gl_Position.xy / gl_in[0].gl_Position.w;
|
||||
vec2 ndc_1 = gl_in[1].gl_Position.xy / gl_in[1].gl_Position.w;
|
||||
|
||||
vec2 dir = normalize((ndc_1 - ndc_0) * viewport_size);
|
||||
vec2 normal_dir = vec2(-dir.y, dir.x);
|
||||
|
||||
line_width = max(1.0, width) + 2.0 * aa_radius;
|
||||
float half_line_width = 0.5 * line_width;
|
||||
|
||||
vec2 normal = vec2(line_width / viewport_size[0], line_width / viewport_size[1]) * normal_dir;
|
||||
|
||||
seg_params = vec2(-half_line_width, coord_s[0]);
|
||||
gl_Position = vec4((ndc_0 + normal) * gl_in[0].gl_Position.w, gl_in[0].gl_Position.zw);
|
||||
EmitVertex();
|
||||
|
||||
seg_params = vec2(-half_line_width, coord_s[0]);
|
||||
gl_Position = vec4((ndc_0 - normal) * gl_in[0].gl_Position.w, gl_in[0].gl_Position.zw);
|
||||
EmitVertex();
|
||||
|
||||
seg_params = vec2(half_line_width, coord_s[1]);
|
||||
gl_Position = vec4((ndc_1 + normal) * gl_in[1].gl_Position.w, gl_in[1].gl_Position.zw);
|
||||
EmitVertex();
|
||||
|
||||
seg_params = vec2(half_line_width, coord_s[1]);
|
||||
gl_Position = vec4((ndc_1 - normal) * gl_in[1].gl_Position.w, gl_in[1].gl_Position.zw);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
18
resources/shaders/140/dashed_thick_lines.vs
Normal file
|
@ -0,0 +1,18 @@
|
|||
#version 150
|
||||
|
||||
// see as reference: https://github.com/mhalber/Lines/blob/master/geometry_shader_lines.h
|
||||
// https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
|
||||
// v_position.w = coordinate along the line
|
||||
in vec4 v_position;
|
||||
|
||||
out float coord_s;
|
||||
|
||||
void main()
|
||||
{
|
||||
coord_s = v_position.w;
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position.xyz, 1.0);
|
||||
}
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = uniform_color;
|
||||
out_color = uniform_color;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ uniform sampler2D uniform_texture;
|
|||
|
||||
in vec2 tex_coord;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture(uniform_texture, tex_coord);
|
||||
out_color = texture(uniform_texture, tex_coord);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ in vec4 world_pos;
|
|||
in float world_normal_z;
|
||||
in vec3 eye_normal;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
|
@ -72,8 +74,8 @@ void main()
|
|||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
gl_FragColor = vec4(0.45 * texture(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, alpha);
|
||||
out_color = vec4(0.45 * texture(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, alpha);
|
||||
else
|
||||
#endif
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
out_color = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
}
|
||||
|
|
|
@ -1,77 +1,77 @@
|
|||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
out vec3 clipping_planes_dots;
|
||||
|
||||
out vec4 world_pos;
|
||||
out float world_normal_z;
|
||||
out vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
eye_normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * v_normal)).z : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
}
|
||||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
out vec3 clipping_planes_dots;
|
||||
|
||||
out vec4 world_pos;
|
||||
out float world_normal_z;
|
||||
out vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * v_normal)).z : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ uniform float emission_factor;
|
|||
// x = tainted, y = specular;
|
||||
in vec2 intensity;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
out_color = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
}
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ uniform float emission_factor;
|
|||
// x = tainted, y = specular;
|
||||
in vec2 intensity;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
out_color = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
}
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
// vertex attributes
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
// instance attributes
|
||||
in vec3 i_offset;
|
||||
in vec2 i_scales;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
|
||||
vec4 eye_position = view_model_matrix * world_position;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * eye_position;
|
||||
}
|
||||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
// vertex attributes
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
// instance attributes
|
||||
in vec3 i_offset;
|
||||
in vec2 i_scales;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
|
||||
vec4 eye_position = view_model_matrix * world_position;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * eye_position;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ uniform sampler2D Texture;
|
|||
in vec2 Frag_UV;
|
||||
in vec4 Frag_Color;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = Frag_Color * texture(Texture, Frag_UV.st);
|
||||
out_color = Frag_Color * texture(Texture, Frag_UV.st);
|
||||
}
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = uniform_color;
|
||||
out_color = uniform_color;
|
||||
}
|
||||
|
|
|
@ -22,11 +22,13 @@ uniform vec4 uniform_color;
|
|||
uniform bool volume_mirrored;
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
in vec3 clipping_planes_dots;
|
||||
in vec4 model_pos;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
|
@ -43,7 +45,7 @@ void main()
|
|||
triangle_normal = -triangle_normal;
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(normal_matrix * triangle_normal);
|
||||
vec3 eye_normal = normalize(view_normal_matrix * triangle_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
|
@ -59,5 +61,5 @@ void main()
|
|||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
out_color = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,8 @@ uniform bool transparent_background;
|
|||
uniform bool svg_source;
|
||||
|
||||
in vec2 tex_coord;
|
||||
out vec4 frag_color;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
vec4 svg_color()
|
||||
{
|
||||
|
@ -33,5 +34,5 @@ void main()
|
|||
{
|
||||
vec4 color = svg_source ? svg_color() : non_svg_color();
|
||||
color.a = transparent_background ? color.a * 0.5 : color.a;
|
||||
frag_color = color;
|
||||
out_color = color;
|
||||
}
|
|
@ -11,9 +11,11 @@ uniform vec3 world_center;
|
|||
in vec2 intensity;
|
||||
in vec3 world_position;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 delta = world_position - world_center;
|
||||
vec4 color = delta.x * delta.y * delta.z > 0.0 ? BLACK : WHITE;
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color.rgb * (intensity.x + emission_factor), 1.0);
|
||||
out_color = vec4(vec3(intensity.y) + color.rgb * (intensity.x + emission_factor), 1.0);
|
||||
}
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
out vec3 world_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
world_position = v_position;
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
out vec3 world_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
world_position = v_position;
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ in vec2 intensity;
|
|||
|
||||
in float object_z;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
float object_z_row = z_to_texture_row * object_z;
|
||||
|
@ -37,5 +39,5 @@ void main()
|
|||
color = mix(texture(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), -10000.),
|
||||
texture(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 10000.), lod);
|
||||
// Mix the final color.
|
||||
gl_FragColor = vec4(vec3(intensity.y), 1.0) + intensity.x * mix(color, vec4(1.0, 1.0, 0.0, 1.0), z_blend);
|
||||
out_color = vec4(vec3(intensity.y), 1.0) + intensity.x * mix(color, vec4(1.0, 1.0, 0.0, 1.0), z_blend);
|
||||
}
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform float object_max_z;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
in vec2 v_tex_coord;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
out float object_z;
|
||||
|
||||
void main()
|
||||
{
|
||||
// =====================================================
|
||||
// NOTE:
|
||||
// when object_max_z > 0.0 we are rendering the overlay
|
||||
// when object_max_z == 0.0 we are rendering the volumes
|
||||
// =====================================================
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = (object_max_z > 0.0) ? vec3(0.0, 0.0, 1.0) : normalize(normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular)
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Scaled to widths of the Z texture.
|
||||
object_z = (object_max_z > 0.0) ? object_max_z * v_tex_coord.y : (volume_world_matrix * vec4(v_position, 1.0)).z;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
#version 140
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform float object_max_z;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
in vec2 v_tex_coord;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
|
||||
out float object_z;
|
||||
|
||||
void main()
|
||||
{
|
||||
// =====================================================
|
||||
// NOTE:
|
||||
// when object_max_z > 0.0 we are rendering the overlay
|
||||
// when object_max_z == 0.0 we are rendering the volumes
|
||||
// =====================================================
|
||||
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = (object_max_z > 0.0) ? vec3(0.0, 0.0, 1.0) : normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular)
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Scaled to widths of the Z texture.
|
||||
object_z = (object_max_z > 0.0) ? object_max_z * v_tex_coord.y : (volume_world_matrix * vec4(v_position, 1.0)).z;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
|
13
resources/shaders/ES/background.fs
Normal file
|
@ -0,0 +1,13 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
uniform vec4 top_color;
|
||||
uniform vec4 bottom_color;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = mix(bottom_color, top_color, tex_coord.y);
|
||||
}
|
12
resources/shaders/ES/background.vs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#version 100
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec2 v_tex_coord;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
tex_coord = v_tex_coord;
|
||||
gl_Position = vec4(v_position, 1.0);
|
||||
}
|
20
resources/shaders/ES/dashed_lines.fs
Normal file
|
@ -0,0 +1,20 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
// see as reference: https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
||||
|
||||
uniform float dash_size;
|
||||
uniform float gap_size;
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
varying float coord_s;
|
||||
|
||||
void main()
|
||||
{
|
||||
float inv_stride = 1.0 / (dash_size + gap_size);
|
||||
if (gap_size > 0.0 && fract(coord_s * inv_stride) > dash_size * inv_stride)
|
||||
discard;
|
||||
|
||||
gl_FragColor = uniform_color;
|
||||
}
|
17
resources/shaders/ES/dashed_lines.vs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#version 100
|
||||
|
||||
// see as reference: https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
|
||||
// v_position.w = coordinate along the line
|
||||
attribute vec4 v_position;
|
||||
|
||||
varying float coord_s;
|
||||
|
||||
void main()
|
||||
{
|
||||
coord_s = v_position.w;
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position.xyz, 1.0);
|
||||
}
|
10
resources/shaders/ES/flat.fs
Normal file
|
@ -0,0 +1,10 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = uniform_color;
|
||||
}
|
11
resources/shaders/ES/flat.vs
Normal file
|
@ -0,0 +1,11 @@
|
|||
#version 100
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
}
|
17
resources/shaders/ES/flat_clip.fs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
|
||||
gl_FragColor = uniform_color;
|
||||
}
|
23
resources/shaders/ES/flat_clip.vs
Normal file
|
@ -0,0 +1,23 @@
|
|||
#version 100
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
vec4 world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
}
|
12
resources/shaders/ES/flat_texture.fs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
uniform sampler2D uniform_texture;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(uniform_texture, tex_coord);
|
||||
}
|
15
resources/shaders/ES/flat_texture.vs
Normal file
|
@ -0,0 +1,15 @@
|
|||
#version 100
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec2 v_tex_coord;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
tex_coord = v_tex_coord;
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
}
|
81
resources/shaders/ES/gouraud.fs
Normal file
|
@ -0,0 +1,81 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
const float EPSILON = 0.0001;
|
||||
|
||||
struct PrintVolumeDetection
|
||||
{
|
||||
// 0 = rectangle, 1 = circle, 2 = custom, 3 = invalid
|
||||
int type;
|
||||
// type = 0 (rectangle):
|
||||
// x = min.x, y = min.y, z = max.x, w = max.y
|
||||
// type = 1 (circle):
|
||||
// x = center.x, y = center.y, z = radius
|
||||
vec4 xy_data;
|
||||
// x = min z, y = max z
|
||||
vec2 z_data;
|
||||
};
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
uniform sampler2D environment_tex;
|
||||
uniform bool use_environment_tex;
|
||||
#endif // ENABLE_ENVIRONMENT_MAP
|
||||
|
||||
uniform PrintVolumeDetection print_volume;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
vec3 color = uniform_color.rgb;
|
||||
float alpha = uniform_color.a;
|
||||
|
||||
if (slope.actived && world_normal_z < slope.normal_z - EPSILON) {
|
||||
color = vec3(0.7, 0.7, 1.0);
|
||||
alpha = 1.0;
|
||||
}
|
||||
|
||||
// if the fragment is outside the print volume -> use darker color
|
||||
vec3 pv_check_min = ZERO;
|
||||
vec3 pv_check_max = ZERO;
|
||||
if (print_volume.type == 0) {
|
||||
// rectangle
|
||||
pv_check_min = world_pos.xyz - vec3(print_volume.xy_data.x, print_volume.xy_data.y, print_volume.z_data.x);
|
||||
pv_check_max = world_pos.xyz - vec3(print_volume.xy_data.z, print_volume.xy_data.w, print_volume.z_data.y);
|
||||
}
|
||||
else if (print_volume.type == 1) {
|
||||
// circle
|
||||
float delta_radius = print_volume.xy_data.z - distance(world_pos.xy, print_volume.xy_data.xy);
|
||||
pv_check_min = vec3(delta_radius, 0.0, world_pos.z - print_volume.z_data.x);
|
||||
pv_check_max = vec3(0.0, 0.0, world_pos.z - print_volume.z_data.y);
|
||||
}
|
||||
color = (any(lessThan(pv_check_min, ZERO)) || any(greaterThan(pv_check_max, ZERO))) ? mix(color, ZERO, 0.3333) : color;
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
gl_FragColor = vec4(0.45 * texture2D(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, alpha);
|
||||
else
|
||||
#endif
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
|
||||
}
|
77
resources/shaders/ES/gouraud.vs
Normal file
|
@ -0,0 +1,77 @@
|
|||
#version 100
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION)
|
||||
//#define LIGHT_FRONT_SHININESS 5.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = diffuse, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
|
||||
varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * v_normal)).z : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
}
|
14
resources/shaders/ES/gouraud_light.fs
Normal file
|
@ -0,0 +1,14 @@
|
|||
#version 100
|
||||
|
||||
precision highp float;
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
uniform float emission_factor;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
}
|
45
resources/shaders/ES/gouraud_light.vs
Normal file
|
@ -0,0 +1,45 @@
|
|||
#version 100
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position.xyz), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
12
resources/shaders/ES/gouraud_light_instanced.fs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#version 100
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
uniform float emission_factor;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(vec3(intensity.y) + uniform_color.rgb * (intensity.x + emission_factor), uniform_color.a);
|
||||
}
|
50
resources/shaders/ES/gouraud_light_instanced.vs
Normal file
|
@ -0,0 +1,50 @@
|
|||
#version 100
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 20.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
|
||||
// vertex attributes
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
// instance attributes
|
||||
attribute vec3 i_offset;
|
||||
attribute vec2 i_scales;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
vec3 eye_normal = normalize(view_normal_matrix * v_normal);
|
||||
|
||||
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
|
||||
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
|
||||
float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
|
||||
|
||||
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
|
||||
vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
|
||||
vec4 eye_position = view_model_matrix * world_position;
|
||||
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position.xyz), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
|
||||
|
||||
// Perform the same lighting calculation for the 2nd light source (no specular applied).
|
||||
NdotL = max(dot(eye_normal, LIGHT_FRONT_DIR), 0.0);
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
gl_Position = projection_matrix * eye_position;
|
||||
}
|