Skip to content
This repository
Browse code

Only using medium precision floats in the pixel shader.

  • Loading branch information...
commit 71794aa416c18a0e5292e8721ef393578355eeb3 1 parent 5450b57
Ray Batts authored
BIN  MonoGame.Framework/Graphics/Effect/Resources/AlphaTestEffect.ogl.mgfxo
Binary file not shown
BIN  MonoGame.Framework/Graphics/Effect/Resources/BasicEffect.ogl.mgfxo
Binary file not shown
BIN  MonoGame.Framework/Graphics/Effect/Resources/DualTextureEffect.ogl.mgfxo
Binary file not shown
BIN  MonoGame.Framework/Graphics/Effect/Resources/EnvironmentMapEffect.ogl.mgfxo
Binary file not shown
BIN  MonoGame.Framework/Graphics/Effect/Resources/SkinnedEffect.ogl.mgfxo
Binary file not shown
BIN  MonoGame.Framework/Graphics/Effect/Resources/SpriteEffect.ogl.mgfxo
Binary file not shown
5  Tools/2MGFX/DXShaderData.mojo.cs
@@ -175,8 +175,11 @@ public static DXShaderData CreateGLSL (byte[] byteCode, List<DXConstantBufferDat
175 175
 			glslCode = glslCode.Replace ("#version 110", "");
176 176
 
177 177
 			// Add the required precision specifiers for GLES.
  178
+
  179
+            var floatPrecision = dxshader.IsVertexShader ? "precision highp float;\r\n" : "precision mediump float;\r\n";
  180
+
178 181
 			glslCode = "#ifdef GL_ES\r\n" +
179  
-				"precision mediump float;\r\n" +
  182
+                 floatPrecision +
180 183
 				"precision mediump int;\r\n" +
181 184
 				"#endif\r\n" +
182 185
 				glslCode;

0 notes on commit 71794aa

Please sign in to comment.
Something went wrong with that request. Please try again.