Skip to content

Commit

Permalink
Only using medium precision floats in the pixel shader.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Batts authored and Ray Batts committed Dec 28, 2012
1 parent 5450b57 commit 71794aa
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 1 deletion.
Binary file not shown.
Binary file modified MonoGame.Framework/Graphics/Effect/Resources/BasicEffect.ogl.mgfxo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 4 additions & 1 deletion Tools/2MGFX/DXShaderData.mojo.cs
Expand Up @@ -175,8 +175,11 @@ public static DXShaderData CreateGLSL (byte[] byteCode, List<DXConstantBufferDat
glslCode = glslCode.Replace ("#version 110", "");

// Add the required precision specifiers for GLES.

var floatPrecision = dxshader.IsVertexShader ? "precision highp float;\r\n" : "precision mediump float;\r\n";

glslCode = "#ifdef GL_ES\r\n" +
"precision mediump float;\r\n" +
floatPrecision +
"precision mediump int;\r\n" +
"#endif\r\n" +
glslCode;
Expand Down

0 comments on commit 71794aa

Please sign in to comment.