VOGONS


First post, by lizard78

User metadata
Rank Newbie
Rank
Newbie

Hi there,
Not sure if bug reports are welcome here, if not please feel free to disregard. I noticed a problem with dgvoodoo which I believe has to do with the use of homogeneous coordinates in Glide 3.x. I grabbed the latest version from github. Basically the Y axis gets flipped, not really sure why this happens but it definitely doesn't happen on a real Voodoo3. Example vertex configuration:
grCoordinateSpace(GR_CLIP_COORDS);
grVertexLayout(GR_PARAM_XY, 0, GR_PARAM_ENABLE);
grVertexLayout(GR_PARAM_Z, 8, GR_PARAM_ENABLE);
grVertexLayout(GR_PARAM_W, 12, GR_PARAM_ENABLE);
grVertexLayout(GR_PARAM_RGB, 16, GR_PARAM_ENABLE);
grVertexLayout(GR_PARAM_A, 28, GR_PARAM_ENABLE);

Window is set to GR_ORIGIN_LOWER_LEFT. I can provide more details if needed.

Attachments

  • flipped.jpg
    Filename
    flipped.jpg
    File size
    38.36 KiB
    Views
    500 views
    File license
    Public domain

Reply 1 of 4, by Dege

User metadata
Rank l33t
Rank
l33t

Hi!

How could I test/reproduce it?
I modified and tried a sample app from the Glide3 SDK using clip space coords to do that with GR_ORIGIN_LOWER_LEFT, but the rendering didn't get inverted vertically.
It only should if the height parameter from grViewPort is negative.

But if the result is different from a real Voodoo then it's apparently a problem.

Reply 2 of 4, by lizard78

User metadata
Rank Newbie
Rank
Newbie

Hi Dege,
I put together a quick demo scene for you and tested it (working) on a Voodoo 2. Attached it to this post. Hopefully you are able to log the Glide calls and notice something interesting, because it would be difficult for me to extract the code needed for a minimal repro. I'm still not 100% sure what causes this - all I know is inverting the Y axis for the clip coords seems to fix it (but gives disastrous results on the real voodoo 😁).

Attachments

  • ex.png
    Filename
    ex.png
    File size
    182.2 KiB
    Views
    274 views
    File license
    Public domain
  • ex2.png
    Filename
    ex2.png
    File size
    156.04 KiB
    Views
    284 views
    File license
    Public domain
  • Filename
    demo.zip
    File size
    3.31 MiB
    Downloads
    11 downloads
    File license
    Public domain