Porting to Monogame

Status
Not open for further replies.
I want to retake this post, is possible the complete port of the current project dollhouse code,??? as i said i get error for the Effects files, that need to be changed to Monogame Effect format:
Code:
This does not appear to be a MonoGame MGFX file!
 

Attachments

  • tsoclient.png
    tsoclient.png
    199.4 KB · Views: 15
I've narrowed the bug down to the worldViewProjection matrix being wrong or the calculation having an unexpected result. Next I need to see whether the input matrix is wrong or if it's not being applied correctly in the shader.
 
Mat Monogame 3.3:
+ mat ( 0.04166666 -0.02777778 -6.123725E-05 0 )
( 0 0.06804138 -5E-05 0 )
( -0.04166668 -0.02777777 -6.123723E-05 0 )
( 1.348699E-06 5.333333 0.5117576 1 ) Microsoft.Xna.Framework.Matrix


Mat XNA

+ mat { {M11:0.04166666 M12:-0.02777778 M13:-6.123725E-05 M14:0}
{M21:0 M22:0.06804138 M23:-5E-05 M24:0}
{M31:-0.04166668 M32:-0.02777777 M33:-6.123723E-05 M34:0}
{M41:1.348699E-06 M42:5.333333 M43:0.5117576 M44:1} } Microsoft.Xna.Framework.Matrix

So they're, uh, the same... Not sure why the difference is so pronounced.
 
Last edited:
upload_2015-1-22_13-29-38.png
Finally fixed it! I bet you want to know what the fix was. I know you do. Here it is:

Code:
    result.backDepth = backProjection.z / backProjection.w + (0.00000000001*backProjection.x+0.00000000001*backProjection.y);
    result.frontDepth = frontProjection.z / frontProjection.w + (0.00000000001*frontProjection.x+0.00000000001*frontProjection.y);
"but rhys!" I hear you say, "that makes no sense whatsoever!"

Exactly.

Two components of the world projection matrix were not being used for whatever reason (when I checked the glsl source), which was causing its uniform to be completely broken. I fixed that. The two rows it was missing were actually skippable, but Monogame removed them and didn't actually handle removing them correctly when passing the matrix to the shader.

I'll probably rewrite the shader to pass two only rows of the worldProjectionMatrix and manually dot them instead of needlessly calculating the other rows and slightly offsetting the depth to get around a stupid bug.
 
Rhys, I love you! Now we can switch to Monogame and compile for Linux and Mac and set up the lot buy system! :D
 
Not so fast!! Clicking on objects doesn't work yet, and the debug windows still use windows forms.
 
VS2010 right now. I might move the project to a later version before merging though, as we now use the Monogame Content Pipeline to compile content separately.
 
Finally fixed it! I bet you want to know what the fix was. I know you do. Here it is:

You was talking with me??? good work anyway for fix it

Not so fast!! Clicking on objects doesn't work yet, and the debug windows still use windows forms.

What do you mean, if you change it to monogame, the clicking objects will not work?? also for windows forms i think monogame can handle it on cross platform...
 
VS2010 right now. I might move the project to a later version before merging though, as we now use the Monogame Content Pipeline to compile content separately.
MonoGame doesn't have proper support for 2013 Community. That includes the Content Pipline. I tried.
 
Last edited:
Rhys is more experienced.
Anywho, we don't need to create a Content project, as we can compile Content seperately.
 
Not anymore, I'm now using the monogame 3.3 pipeline externally, which works perfectly.

Linking a 2 month old issue which uses an embedded content project does not help.
 
Nice. :D
Linking a 2 month old issue which uses an embedded content project does not help.
Yeah, I'll believe that when it doesn't work.
That's why I showed you the link. Also, MonoGame 3.3 isn't even stable. Only 3.2 and that in came out April 7, 2014. So the issue is still valid.
monogame said:
When new fixes, features, or changes are merged into our development branch the build server generates new installers. It is extremely helpful to have the community install and use these builds when ever possible. We find these releases to be generally stable, but if you do run into a bug please report it to us.
Fair enough.
 
Last edited:
Status
Not open for further replies.
Back
Top