Procházet zdrojové kódy

Merge pull request #1705 from zhutq/master

Fixes fog for right-handed system
David Catuhe před 8 roky
rodič
revize
d02026fa10

+ 1 - 1
src/Shaders/ShadersInclude/fogVertex.fx

@@ -1,3 +1,3 @@
 #ifdef FOG
-fFogDistance = (view * worldPos).z;
+fFogDistance = abs((view * worldPos).z);
 #endif

+ 1 - 1
src/Shaders/sprites.vertex.fx

@@ -46,6 +46,6 @@ void main(void) {
 
 	// Fog
 #ifdef FOG
-	fFogDistance = viewPos.z;
+	fFogDistance = abs(viewPos.z);
 #endif
 }