Just as a quick test, I'm going to eject the existing fake projection and replace it with a mat*vec multiply with the layout you suggested. Worst case, there's another intervening matrix along the line that hasn't been ID'd yet. Best case, it still works! Thanks!
-
-
Vastauksena käyttäjille @TheMogMiner ja @Atrix256
as far as these go, these perspective transforms are really weird. i wrote down the vectors after the transformation; the next step is typically a division by w to then get the NDC. but c is zero, so the first one will be garbage. the second one would at least workpic.twitter.com/f0iaCmdM1D
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
or i am misreading, let me try that again
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
this is the other option, assuming the matrices are transposedpic.twitter.com/88OVwszvA6
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @leonard_ritter ja @Atrix256
I just noticed some fuckery earlier in the rasterization pipeline implementation that invalidates my previous description. The actual hacked projection right now seems to be: X = 320 + 768*(X / Z) Y = 240 - 768*(Y / Z) Z = Z W = 1.0f / Zpic.twitter.com/z6AUZdV43j
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @TheMogMiner ja @Atrix256
shouldn't that be (320 + 768*X)/Z etc?
2 vastausta 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @leonard_ritter ja @Atrix256
Probably? I'm just describing how the current code flow is, which it looks like through sheer luck seems to produce a visible 3D scene. Here's the code immediately after the screenshot I posted, plus the render_project function.pic.twitter.com/PEjnwFxbES
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @TheMogMiner ja @Atrix256
a vector ready for z division usually looks like {x y 1 z}, so the division by w is indeed a division by z. when all components are multiplied by w, which has been preinverted (a bit unusual): x' = (320 + 768*x) / z y'= (320 + 768*x) / z z' = 1 / z w' = 1
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @leonard_ritter ja @Atrix256
That looks somewhat close to how it is, it's just right now the Z divide on X/Y is being done before the inner equation, rather than after it. I've added some more debug logging, hopefully I can see what the actual verts look like before any transforms.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @TheMogMiner ja @Atrix256
it's super confusing that they have .x,.y .w as well as .p[0] to .p[3]
2 vastausta 0 uudelleentwiittausta 0 tykkäystä
I've been doing a pretty poor job of explaining the whole thing, but there is no .w, just .x and .y - any other interpolants (Z, W, anything else) get specified in a parameter array. https://github.com/mamedev/mame/blob/master/src/devices/video/poly.h … And, the driver itself: https://github.com/mamedev/mame/blob/master/src/mame/drivers/namcos23.cpp …pic.twitter.com/CVk2r0yHWJ
-
-
Vastauksena käyttäjille @TheMogMiner ja @Atrix256
the mysterious 24 word packet that you originally posted, is that what these matrices look like typically or is it supposed to be weird for this game? what does it look like for a game that renders correctly?
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @leonard_ritter ja @Atrix256
Based on looking at the underlying game code, it appears to be a standard function that's used by each game to set up at least the projection matrix. Here's what it is in the scene I screenshotted: 1.0, 0.0, -0.414215, 0.0 0.0, 1.0, -0.310669, 0.0 0.0, 0.0, -1.0, 0.0
2 vastausta 0 uudelleentwiittausta 1 tykkäys - Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.