I've converted the core of the Krypton Lighting Engine so that it's compatible with Windows 8.

The trouble I'm having when actually using it is that it can't load the KryptonEffect.xnb file. I'm aware that MonoGame doesn't have XNA content processors, so I'm compiling the KryptonEffect.fx file in an XNA Content project.

When I try to load the Effect, I get an exception saying The MGFX file is corrupt in the ReadEffect method in MonoGame. The header should be MGFX but it's a seemingly random byte array.

I then came across this page that says to use a tool named 2MGFX. I tried this, but the tool reports: The effect must contain at least one technique and pass. From what I can see from KryptonEffect.fx the file, it does.

Has anyone got the Krypton Lighting Engine working on MonoGame for Windows 8? Or has anyone been able to load any kind of Effect file under Windows 8?

  • \$\begingroup\$ You actually want to know if anyone has gotten it working, or you want to know how to get it working yourself? You should be more specific about the troubles you're having getting it working yourself, so this doesn't turn into a discussion. \$\endgroup\$
    – House
    Commented Jan 7, 2013 at 20:42
  • \$\begingroup\$ Hi Byte56, I'd like to know what I need to do to get it working, in particular, loading an Effect file. I think they're related so didn't restrict it to one or the other. \$\endgroup\$
    – Steve Dunn
    Commented Jan 7, 2013 at 22:06
  • \$\begingroup\$ I also had a similar experience with MonoGame not loading XNB effects well. There's actually a monogame-specific effects format you can use. I never bothered. \$\endgroup\$
    – ashes999
    Commented Jan 26, 2013 at 23:45
  • \$\begingroup\$ Tom Spillman is being a great help in resolving the issues with the effect file from Krypton. I think there's just one little issue to resolve now before it's compatible with MonoGame. Will submit pull request when all resolved. \$\endgroup\$
    – Steve Dunn
    Commented Jan 27, 2013 at 15:14
  • \$\begingroup\$ I managed to get both Krypton and Krypton shader compile for MonoGame Windows 8 platform. However, no light is currently rendered and I can only see the hulls in the Krypton sample. Still trying to figure out what might be causing this behavior. \$\endgroup\$ Commented May 13, 2013 at 9:20

1 Answer 1


Change Content Processor To "MonoGame Effect".

  • 1
    \$\begingroup\$ Hello Hobir! Welcome to gamedev.stackexchange.com. :) I have an improvement proposal for your answer: Add more information! (Think of "why?" and "how?" to get something done) \$\endgroup\$
    – bandrewk
    Commented Apr 2, 2013 at 8:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .