Browse Source

fix HiDef InfiniteGridEffect for OpenGL

Nikos Kastellanos 11 months ago
parent
commit
1e322fa294
1 changed files with 2 additions and 1 deletions
  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);