The fog code in PBRLighting.j3md is encountering the same issue that was reported before with Lighting.j3md : https://github.com/jMonkeyEngine/jmonkeyengine/pull/1458 This PR should fix the issue.
@@ -88,7 +88,7 @@ void main(){
#endif
#ifdef USE_FOG
- fogDistance = distance(g_CameraPosition, (g_WorldMatrix * modelSpacePos).xyz);
+ fogDistance = distance(g_CameraPosition, (TransformWorld(modelSpacePos)).xyz);
}