Skip to content

Conversation

@mardy
Copy link
Collaborator

@mardy mardy commented Nov 25, 2024

A few commits to enable sprite particles in Neverball.

- The GX_SetPointSize() accepts an unsigned byte, so clamp the size to
  255.
- Remove the multiplication by 16, it's not clear why that was there in
  the first place.
- Set the lower right corner of the point to have texture coordinates
  (1, 1): this allows drwaing textures on points.
Even if the client state has texture coordinates disabled, they might
still be generated.
These variables will be used in the next commits.
If the GL_COORD_REPLACE flag is set, then instead of the texture
coordinates found on the vertex, we should use a hardcoded (0, 0)
coordinate for the top left corner, and (1, 1) for the bottom right.
We do this by replacing the vertex array with the PointSpritesTexReader
class, whose reader method always returns (0, 0).

We also need to modify a few other places so that the array classes know
what is the primitive being drawn, because this swap must only be
applied when rendering points.
@WinterMute WinterMute merged commit 60afb21 into devkitPro:master Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants