Skip to content

Commit

Permalink
Don't invert scale in node editor settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Nov 8, 2023
1 parent 6ca6d14 commit e7d934b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/FastNoiseNodeEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void FastNoiseNodeEditor::Node::GeneratePreview( bool nodeTreeChanged, bool benc
auto scale = FastNoise::New<FastNoise::DomainScale>( editor.mMaxFeatureSet );
genRGB->SetSource( scale );
scale->SetSource( generator );
scale->SetScaling( 1 / editor.mNodeScale );
scale->SetScaling( editor.mNodeScale );

FastNoise::SmartNode<FastNoise::ConvertRGBA8> l(nullptr);

Expand Down
2 changes: 1 addition & 1 deletion tools/FastNoiseNodeEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace Magnum
int32_t mNodeBenchmarkIndex = 0;
int32_t mNodeBenchmarkMax = 128;

float mNodeScale = 0.4f;
float mNodeScale = 2.5f;
int mNodeSeed = 1337;
NoiseTexture::GenType mNodeGenType = NoiseTexture::GenType_2D;

Expand Down
2 changes: 1 addition & 1 deletion tools/MeshNoisePreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void MeshNoisePreview::ReGenerate( FastNoise::SmartNodeArg<> generator )
mLoadRange = 200.0f;
mBuildData.generator = generator;
mBuildData.generatorScaled = FastNoise::New<FastNoise::DomainScale>( generator->GetActiveFeatureSet() );
mBuildData.generatorScaled->SetScaling( 1 / mBuildData.scale );
mBuildData.generatorScaled->SetScaling( mBuildData.scale );
mBuildData.generatorScaled->SetSource( generator );
mBuildData.pos = Vector3i( 0 );

Expand Down
4 changes: 2 additions & 2 deletions tools/NoiseTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void NoiseTexture::DoExport()

float relativeScale = (float)mExportBuildData.size.sum() / mBuildData.size.sum();

mExportBuildData.scale *= relativeScale;
mExportBuildData.scale /= relativeScale;
mExportBuildData.offset *= relativeScale;

if( mExportThread.joinable() )
Expand Down Expand Up @@ -333,7 +333,7 @@ NoiseTexture::TextureData NoiseTexture::BuildTexture( const BuildData& buildData
auto scale = FastNoise::New<FastNoise::DomainScale>( buildData.generator->GetActiveFeatureSet() );
gen->SetSource( scale );
scale->SetSource( buildData.generator );
scale->SetScaling( 1 / buildData.scale );
scale->SetScaling( buildData.scale );

FastNoise::OutputMinMax minMax;

Expand Down

0 comments on commit e7d934b

Please sign in to comment.