Seam stars margin increase

This commit is contained in:
Sonic Dreamcaster 2025-03-29 04:44:59 -03:00
parent 8222c85804
commit 2d16e8c44f

View file

@ -207,7 +207,7 @@ void Background_DrawStarfield(void) {
float starfieldHeight; float starfieldHeight;
float vx; float vx;
float vy; float vy;
const float STAR_MARGIN = 10.0f; // Margin to hide seam stars const float STAR_MARGIN = 40.0f; // Margin to hide seam stars
// Set projection to orthographic before drawing stars // Set projection to orthographic before drawing stars
Lib_InitOrtho(&gMasterDisp); Lib_InitOrtho(&gMasterDisp);
@ -295,8 +295,8 @@ void Background_DrawStarfield(void) {
if (vx >= (marginX - STAR_MARGIN) && vx <= (marginX + renderMaskWidth + STAR_MARGIN) && if (vx >= (marginX - STAR_MARGIN) && vx <= (marginX + renderMaskWidth + STAR_MARGIN) &&
vy >= (renderMaskHeight - STAR_MARGIN) && vy <= ((renderMaskHeight * 2) + STAR_MARGIN)) { vy >= (renderMaskHeight - STAR_MARGIN) && vy <= ((renderMaskHeight * 2) + STAR_MARGIN)) {
bool skipInterpolation = (fabsf(vx - gStarPrevX[i]) > starfieldWidth / 2.0f) || bool skipInterpolation = (fabsf(vx - gStarPrevX[i]) > (marginX + renderMaskWidth + STAR_MARGIN) / 2.0f) ||
(fabsf(vy - gStarPrevY[i]) > starfieldHeight / 2.0f); (fabsf(vy - gStarPrevY[i]) > (marginX + renderMaskWidth + STAR_MARGIN) / 2.0f);
if (skipInterpolation) { if (skipInterpolation) {
// @port Skip interpolation // @port Skip interpolation
@ -328,7 +328,7 @@ void Background_DrawStarfield(void) {
Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix);
if (skipInterpolation) { if (skipInterpolation) {
// @port Skip interpolation // @port Re-enable Interpolation if it was skipped
FrameInterpolation_ShouldInterpolateFrame(true); FrameInterpolation_ShouldInterpolateFrame(true);
} else { } else {
FrameInterpolation_RecordCloseChild(); FrameInterpolation_RecordCloseChild();