Repository navigation
Handle sprites smaller than one texture stripe - #106
Open
PS2HomeDeveloper wants to merge 1 commit into
Open
PS2HomeDeveloper wants to merge 1 commit into
PS2HomeDeveloper wants to merge 1 commit into
Conversation
## Summary `gsKit_prim_sprite_striped_texture_3d` can calculate a zero or negative `stripcount` when the sprite covers no complete 64-pixel stripe. The function then divides by zero or enters its strip loop with a negative count, which can corrupt the render queue. Fall back to the regular textured-sprite primitive when there are no complete interior stripes, while keeping nearest-neighbor filtering for this path. ## Testing - Build gsKit with the PS2 toolchain. - Draw sprites spanning x=2..30 and x=60..65; verify they render once and the render queue remains usable. - Draw a sprite spanning multiple 64-pixel boundaries, such as x=2..200; verify the existing striped path still renders correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gsKit_prim_sprite_striped_texture_3dcan calculate a zero or negativestripcountwhen the sprite covers no complete 64-pixel stripe. The function then divides by zero or enters its strip loop with a negative count, which can corrupt the render queue.Fall back to the regular textured-sprite primitive when there are no complete interior stripes, while keeping nearest-neighbor filtering for this path.
Testing