Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Mar 5, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Previously I only modularized AdvnacedPBRTerrain.j3md

But now this PR applies the same concept to PBRTerrain.j3md

I ended up deleting the PBRTerrain.frag file, so now both of the terrain's .j3md files reference the same fragment shader, but the advanced version has a boolean called UseTextureArrays set to true to tell the fragment shader to read from texture arrays instead of normal textures.

I also added suppor for metallicRoughnessAoEi maps in the regular PRRTerrain shader (Ao being ambient occlusion that is packed in blue channel, and Ei being emissiv intensity which gets packed in the alpha channel). You will still be limited to 16 textures without using texture arrays, and as always I'd suggest most people juts use the advanced version of the shader primarily, but atleast the option is there.
Removes the UseTextureArrays boolean, and instead map the define to the AlbedoTextureArray. This should be a cleaner way to do it that the define doesn't rely on users going back and setting a boolean on old terrain mats, and gives less chance to accidentally break the shader if the boolean value is cleared by mistake for some reason.
accidentally reverted triplanar to using wPosition instead of lPosition. probably doesn't matter, both should work (although high wPosition values could result in lack of float precision so its best to go with local instead of world)
Finish Modularizing PBRTerrainUtils.glsllb
@pull pull bot added the ⤵️ pull label Mar 5, 2025
This PR addresses this issue: 
#2386 
And then I also found another critical logic error in the spec gloss pipeline that was likely there even before riccardo adapted the shader to use structs:

It looks like the specular value taken from specularMaps was being totally ignored and not used in the roughness calculation. The code further down in the shader was calculating the roughness solely based on m_Glossiness with no regard for the glossiness texture maps, which is incorrect.

The logic error and exception should all be fixed in this PR now, but it will need testing from a spec gloss model with packed specularGlossinesMap as well as a model with seperate specular and glossiness maps in order to ensure everything works properly now.
yaRnMcDonuts and others added 29 commits May 20, 2025 03:07
com.jme3.audio.LowPassFilter lacks the required no-argument constructor for jME deserialization
Add makeGeometry() method to WireSphere for consistency with WireBox
 PBR Fixes: Apply band factor to spherical harmonic coefficients in accelerated baker light and prevent fireflies artifacts
New audio filters: HighPassFilter and BandPassFilter
@pull pull bot merged commit 60c101f into Mu-L:master Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants