Remove sharp transitions (#702)

* Cannon render mode fix

Slipped past me.

* Removed sharp transitions

I like the idea but it really isn´t vanilla and causes issues.
Might be worth revisiting but for now lets just get rid of it.

* fixes

Missing render mode set for transitions, reduced display list alloc for cannon
tested more this time
This commit is contained in:
Lilaa3
2023-09-25 14:26:31 +01:00
committed by GitHub
parent e5bcf95703
commit af3b538ed9
7 changed files with 3 additions and 39 deletions

View File

@@ -2673,25 +2673,6 @@ UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
};
#ifdef SHARP_TRANSITION_TEXTURES
const Texture texture_transition_star_half[] = {
#include "textures/segment2/transition_star_half.i8.inc.c"
};
const Texture texture_transition_circle_half[] = {
#include "textures/segment2/transition_circle_half.i8.inc.c"
};
const Texture texture_transition_mario[] = {
#include "textures/segment2/transition_mario.i8.inc.c"
};
const Texture texture_transition_bowser_half[] = {
#include "textures/segment2/transition_bowser_half.i8.inc.c"
};
#else
const Texture texture_transition_star_half[] = {
#include "textures/segment2/segment2.0F458.ia8.inc.c"
};
@@ -2707,7 +2688,6 @@ const Texture texture_transition_mario[] = {
const Texture texture_transition_bowser_half[] = {
#include "textures/segment2/segment2.11458.ia8.inc.c"
};
#endif
const Texture texture_waterbox_water[] = {
#include "textures/segment2/segment2.11C58.rgba16.inc.c"

View File

@@ -145,11 +145,6 @@
*/
#define EASE_IN_OUT_TRANSITIONS
/**
* Makes use of the tex edge render mode to deliver smooth transition textures
*/
// #define SHARP_TRANSITION_TEXTURES
/**
* Uses frustratio of 2 instead of 1.
* Can improve performance in some circumstances, though it can also cause large tris to warp if cut off from the camera.

View File

@@ -13,12 +13,6 @@
#include "segment2.h"
#include "sm64.h"
#ifdef SHARP_TRANSITION_TEXTURES
#define TRANSITION_TEXTURE_TYPE G_IM_FMT_I
#else
#define TRANSITION_TEXTURE_TYPE G_IM_FMT_IA
#endif
u8 sTransitionFadeTimer = 0;
u16 sTransitionTextureAngle = 0;
@@ -164,21 +158,16 @@ s32 render_textured_transition(s8 transTime, struct WarpTransitionData *transDat
gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0,
0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0);
#ifdef SHARP_TRANSITION_TEXTURES
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2);
#else
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
#endif
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
switch (transTexType) {
case TRANS_TYPE_MIRROR:
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], TRANSITION_TEXTURE_TYPE, G_IM_SIZ_8b, 32, 64, 0,
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 64, 0,
G_TX_WRAP | G_TX_MIRROR, G_TX_WRAP | G_TX_MIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
break;
case TRANS_TYPE_CLAMP:
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], TRANSITION_TEXTURE_TYPE, G_IM_SIZ_8b, 64, 64, 0,
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], G_IM_FMT_IA, G_IM_SIZ_8b, 64, 64, 0,
G_TX_CLAMP, G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
break;
}
@@ -325,7 +314,7 @@ Gfx *render_cannon_circle_base(void) {
gSPDisplayList(g++, dl_proj_mtx_fullscreen);
gDPSetCombineMode(g++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetTextureFilter(g++, G_TF_BILERP);
gDPLoadTextureBlock(g++, sTextureTransitionID[TEX_TRANS_CIRCLE], TRANSITION_TEXTURE_TYPE, G_IM_SIZ_8b, 32, 64, 0,
gDPLoadTextureBlock(g++, sTextureTransitionID[TEX_TRANS_CIRCLE], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 64, 0,
G_TX_WRAP | G_TX_MIRROR, G_TX_WRAP | G_TX_MIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
gSPTexture(g++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPVertex(g++, VIRTUAL_TO_PHYSICAL(verts), 4, 0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB