Sfoglia il codice sorgente

fix HiDef InfiniteGridEffect for OpenGL

Nikos Kastellanos 1 anno fa
parent
commit
1e322fa294
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      Shaders/InfiniteGrid/InfiniteGridEffect.cs

+ 2 - 1
Shaders/InfiniteGrid/InfiniteGridEffect.cs

@@ -202,7 +202,8 @@ namespace nkast.Aether.Shaders
         {
             Plane editPlane = new Plane(EditMatrix.Forward, Vector3.Dot(EditMatrix.Forward, EditMatrix.Translation));
 
-            TexelSize = new Vector2(1f / viewport.Width, 1f / viewport.Height);
+            if (this.GraphicsDevice.GraphicsProfile == GraphicsProfile.Reach)
+                TexelSize = new Vector2(1f / viewport.Width, 1f / viewport.Height);
             InvProjection = Matrix.Invert(projection);
             InvView = Matrix.Invert(view);
             InvPlaneMatrix = Matrix.Invert(EditMatrix);