Skip to content

Conversation

@johnhaddon
Copy link
Member

This removes all usage of std::random_shuffle(), which was deprecated in C++14 and removed in C++17 (which is the version we should be using). Even when not deprecated, the implementations in libc++ (Clang) and libstdc++ (GCC) differed, so we were getting inconsistent results between platforms. We now get consistent PointDistribution results on all platforms (matching the previous results on GCC/Linux).

@ivanimanishi, the potentially contentious thing here is that I've just ripped out PerlinNoise and Turbulence. I'm not aware of any usage outside IE, and there have been superior alternatives in liboslnoise (a C++ library that comes with OpenShadingLanguage) for some time now anyway. My understanding is that they are used in a few rigging nodes at IE, and one Nuke node. Since they're header-only and haven't changed in years, I'm hoping it's feasible for you to copy them into those projects directly (or adopt liboslnoise instead).

@ivanimanishi
Copy link
Member

@johnhaddon, we'll take a look at things here and let you know.

@johnhaddon johnhaddon force-pushed the randomShuffleWoes branch from 174f97c to 9c08d2c Compare June 7, 2022 08:11
This was deprecated in C++14 and removed in C++17.
These are inferior to the implementations provided by OpenShadingLanguage in `liboslnoise`, and are not used anywhere in Cortex or Gaffer. They also relied on `std::random_shuffle()`, which is not consistent between platforms and was deprecated in C++14 and removed in C++17. We can't use the just-hardcode-the-table approach to backwards compatibility we used with PointDistribution, because PerlinNoise generates a different table on the fly each time, using the seed provided.
Also remove explicit override in CI setup, so we inherit the version from the SConstruct.
This was deprecated in C++11 and removed in C++17. It appears to remain available in practice in `libc++` and `libstdc++` but not MSVC.
@johnhaddon johnhaddon force-pushed the randomShuffleWoes branch from a11b5a0 to 290be65 Compare June 9, 2022 07:05
@johnhaddon johnhaddon merged commit 5325d99 into ImageEngine:main Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants