jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.8k stars 1.12k forks source link

Move NoiseLib.glslib #2188

Open yaRnMcDonuts opened 8 months ago

yaRnMcDonuts commented 8 months ago

I appear to have uploaded a file called "NoiseLib.glslib" to the "jme3-terrain" module when I made the PR for PBR terrain shaders. Currently that glslib is only referenced by PBRTerrain.frag and AdvancedPBRTerrain.frag, so I would also need to update those as well.

This glslib contains all of the standard 2d and 3d noise equations for basic noise as well as perlin noise, and could (hopefully) be updated in the future if any jme contributors want to add more noise equations.

(this file: https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-terrain/src/main/resources/Common/MatDefs/Terrain/NoiseLib.glsllib)

In hindsight, I think this should have probably been uploaded to jme3-core in the Common/ShaderLib/ directory so that any jme devs that want to use noise can have easy access to these standard noise equations

Would it be okay if I make a PR to move NoiseLib.glsllib to jme3-core with the other .glslib files? That way, users who are working on shaders that require noise will not have to include the whole jme3-terrain module.

stephengold commented 8 months ago

Sounds good to me.