Explorar el Código

Merge pull request #1705 from zhutq/master

Fixes fog for right-handed system
David Catuhe hace 8 años
padre
commit
d02026fa10
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/Shaders/ShadersInclude/fogVertex.fx
  2. 1 1
      src/Shaders/sprites.vertex.fx

+ 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
 }