Jo Engine Forum

Sega Saturn Development => General Jo Engine Help => Topic started by: 2Tie on October 24, 2018, 11:10:08 pm

Title: One row and column each of sprite duplicated on draw?
Post by: 2Tie on October 24, 2018, 11:10:08 pm
I'm having an issue where any sprite I try to draw seems to have a duplicated strip - Yabause duplicates the first (https://i.imgur.com/kPX7hjB.png), while SSF duplicates the eighth (https://i.imgur.com/CByHE7I.png). The green sprite is a jo_img_8bits that's drawn using jo_sprite_draw3D, and the centre chequerboard and the sky sprite below are img_4bpp's (from XL2's example project, with the chequerboard being handmade to test this) and drawn using slDispSprite (I changed it from slPutSprite so there's no 3D calculations on it if I understand correctly), however all three of these exhibit the same behaviour. I don't think this is a resolution quirk because it happens identically regardless of position, it just seems like the Saturn is trying to draw sprites that are an extra pixel larger than the source image. Does anyone have any ideas to try and fix or counteract this?
Title: Re: One row and column each of sprite duplicated on draw?
Post by: logi on October 25, 2018, 02:21:45 am
I had this same issue when using Yabause. It was duplicating the first pixel in the sprite.
If I remember correctly, I went into the video settings and changed the 'video core' from 'Software Video Interface' to 'OpenGL Video Interface' and I believe that sorted it.
Title: Re: One row and column each of sprite duplicated on draw?
Post by: XL2 on October 25, 2018, 07:34:51 am
Weird, I never noticed that, but I remember reading that a scale of 1 will create a sprite 1 pixel larger. Try, for the scale, 65535 (or toFIXED(0.99999)) instead of 65536 (toFIXED(1.0)).
Title: Re: One row and column each of sprite duplicated on draw?
Post by: 2Tie on October 25, 2018, 06:56:10 pm
Weird, I never noticed that, but I remember reading that a scale of 1 will create a sprite 1 pixel larger. Try, for the scale, 65535 (or toFIXED(0.99999)) instead of 65536 (toFIXED(1.0)).

Thanks, this worked perfectly!