瀏覽代碼

fix HiDef InfiniteGridEffect for OpenGL

Nikos Kastellanos 1 年之前
父節點
當前提交
1e322fa294
共有 1 個文件被更改,包括 2 次插入1 次删除
  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);