Skip to content

Instantly share code, notes, and snippets.

@hifi
Created October 18, 2016 13:01
Show Gist options
  • Save hifi/aa1ac0fd12e01c586770145c503573e5 to your computer and use it in GitHub Desktop.
Save hifi/aa1ac0fd12e01c586770145c503573e5 to your computer and use it in GitHub Desktop.
MGFX loader for UltimaMono
diff --git a/dev/Core/Graphics/SpriteBatch3D.cs b/dev/Core/Graphics/SpriteBatch3D.cs
index 3860238..1a90f69 100644
--- a/dev/Core/Graphics/SpriteBatch3D.cs
+++ b/dev/Core/Graphics/SpriteBatch3D.cs
@@ -15,6 +15,7 @@
using System;
using System.Collections.Generic;
using UltimaXNA.Core.Diagnostics.Tracing;
+using System.IO;
#endregion
namespace UltimaXNA.Core.Graphics
@@ -48,7 +49,7 @@ public SpriteBatch3D(Game game)
m_VertexArray = new VertexPositionNormalTextureHue[MAX_VERTICES_PER_DRAW];
m_VertexListQueue = new Queue<List<VertexPositionNormalTextureHue>>(INITIAL_TEXTURE_COUNT);
- m_Effect = m_Game.Content.Load<Effect>("Shaders/IsometricWorld");
+ m_Effect = new Effect(m_Game.GraphicsDevice, File.ReadAllBytes("Shaders/IsometricWorld.mgfx"));
}
public GraphicsDevice GraphicsDevice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment