Fixes fog for right-handed system
@@ -1,3 +1,3 @@
#ifdef FOG
-fFogDistance = (view * worldPos).z;
+fFogDistance = abs((view * worldPos).z);
#endif
@@ -46,6 +46,6 @@ void main(void) {
// Fog
#ifdef FOG
- fFogDistance = viewPos.z;
+ fFogDistance = abs(viewPos.z);
}