Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Core: -ffp-contract=off so results don't depend on the optimisation level (makepkg's -O2 failed the face_weights exact-match tests)

islandmed10c2cdd44413
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94519e9a..6e2be9f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ All notable changes to SculptForge are listed here. The format follows
## [Unreleased]
+### Fixed
+- Builds at other optimisation levels (Arch and Omarchy packages build at -O2) failed two face-shape tests: the core library no longer fuses multiply-adds, so results are the same at any level.
+
### Changed
- Exports without a material of their own (FBX, USD) and splats made from an unpainted sculpt use the Soft Clay grey instead of the old peach.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8104bcb..68c65c9d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,7 +123,9 @@ if(MSVC)
target_compile_options(sculptforge_core PRIVATE /W4 /utf-8 /permissive-)
target_compile_definitions(sculptforge_core PUBLIC NOMINMAX _USE_MATH_DEFINES)
else()
- target_compile_options(sculptforge_core PRIVATE -Wall -Wextra -Wno-unused-parameter)
+ # -ffp-contract=off: no fused multiply-adds, so a result doesn't depend on the optimisation level (distro
+ # packages build at -O2; face_weights' fast path is tested to match a full evaluation exactly).
+ target_compile_options(sculptforge_core PRIVATE -Wall -Wextra -Wno-unused-parameter -ffp-contract=off)
endif()
# --- Bring-your-own-AI (brush assistant). HTTPS via WinHTTP or libcurl. ---