Skip to content

Commit

Permalink
Document the call loadBlueNoise
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Aug 5, 2024
1 parent 6b8bf93 commit 2e88283
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Docs/src/manual/Migrating/Ogre4.0.Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,11 @@ compositor_node RenderingNodeMsaa
out 0 rt_renderwindow
}
```
```

## New initialization step

If you plan on using Alpha Hashing, we provide both blue and white noise.

But blue noise requires you to call `mRoot->getHlmsManager()->loadBlueNoise()` during start up.
[See its new section in the manual](@ref AlphaHashingBlueNoiseSetup) for more information.
22 changes: 22 additions & 0 deletions Docs/src/manual/Plugins/ParticleSystem2.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,28 @@ The key settings are:
Note that the noise may look terrible but it quite different in motion. See `Samples/2.0/ApiUsage/ParticleFX2` sample.
### Alpha Hashing: Blue Noise vs White Noise {#AlphaHashingBlueNoiseSetup}
The Hlms implementation provide both blue noise and white noise implementations.
Blue Noise requires you include the file `LDR_R_0.png` and during initialization time call:
```cpp
try
{
mRoot->getHlmsManager()->loadBlueNoise();
}
catch( Ogre::FileNotFoundException &e )
{
Ogre::LogManager::getSingleton().logMessage( e.getFullDescription(), Ogre::LML_CRITICAL );
Ogre::LogManager::getSingleton().logMessage(
"WARNING: Blue Noise textures could not be loaded.", Ogre::LML_CRITICAL );
}
```

When blue noise is not available, OgreNext will automatically fallback to a white noise implementation.
Which one looks better is a bit subjective.

## Thread Safe RandomValueProvider

PFX2 relies on `Math::UnitRandom` being thread safe.
Expand Down

0 comments on commit 2e88283

Please sign in to comment.