Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

Conversation

@KdotJPG
Copy link

@KdotJPG KdotJPG commented Feb 9, 2020

Some users may not want to use the original Simplex 3D noise algorithm in the US at the current time. Adding alternative algorithm "OpenSimplex2" based on this and this. HastyNoise already added this in this pull request.

image
image

It's maybe 6% slower than Simplex (tested using GetNoiseSet without displaying the image) and got 539ms vs 504ms for 4096x4096x1, but some people in the US may want/need to use this instead until Jan 2022.

SIMDf score0yr = SIMDf_ABS(d0yr);
SIMDf score0zr = SIMDf_ABS(d0zr);
MASK dir0xr = SIMDf_LESS_EQUAL(SIMDf_MAX(score0yr, score0zr), score0xr);
MASK dir0yr = SIMDi_AND_NOT(dir0xr, SIMDf_LESS_EQUAL(SIMDf_MAX(score0zr, score0xr), score0yr));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MASK dir0yr = SIMDi_AND_NOT(dir0xr, SIMDf_LESS_EQUAL(SIMDf_MAX(score0zr, score0xr), score0yr));
MASK dir0yr = MASK_AND_NOT(dir0xr, SIMDf_LESS_EQUAL(SIMDf_MAX(score0zr, score0xr), score0yr));

SIMDf score0zr = SIMDf_ABS(d0zr);
MASK dir0xr = SIMDf_LESS_EQUAL(SIMDf_MAX(score0yr, score0zr), score0xr);
MASK dir0yr = SIMDi_AND_NOT(dir0xr, SIMDf_LESS_EQUAL(SIMDf_MAX(score0zr, score0xr), score0yr));
MASK dir0zr = SIMDi_NOT(SIMDi_OR(dir0xr, dir0yr));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MASK dir0zr = SIMDi_NOT(SIMDi_OR(dir0xr, dir0yr));
MASK dir0zr = MASK_NOT(MASK_OR(dir0xr, dir0yr));

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants