Fix weird portal surface glitch when portal is moved
This commit is contained in:
parent
0d21f9818b
commit
996de635b6
|
@ -211,10 +211,10 @@ That will generate the rom at `/build/portal64.z64`
|
|||
<br />
|
||||
|
||||
## Current New Feature TODO List
|
||||
- [ ] figure out why portals somtimes are in front of window
|
||||
- [ ] optimize static culling
|
||||
- [ ] jump animation
|
||||
- [ ] pausing while glados is speaking can end her speech early
|
||||
- [x] figure out why portals somtimes are in front of window
|
||||
- [x] portal hole cutting problems
|
||||
- [x] crashed when dying in test chamber 05 when hit by pellet in mid air while touching a portal
|
||||
- [x] rumble pak support
|
||||
|
|
|
@ -1141,7 +1141,7 @@ materials:
|
|||
fmt: G_IM_FMT_RGBA
|
||||
siz: G_IM_SIZ_32b
|
||||
|
||||
gDPSetRenderMode: G_RM_XLU_SURF
|
||||
gDPSetRenderMode: G_RM_ZB_XLU_SURF
|
||||
|
||||
gDPSetCombineMode:
|
||||
color: ["0", "0", "0", "TEXEL0"]
|
||||
|
@ -1160,7 +1160,7 @@ materials:
|
|||
t:
|
||||
shift: 1
|
||||
|
||||
gDPSetRenderMode: G_RM_XLU_SURF
|
||||
gDPSetRenderMode: G_RM_ZB_XLU_SURF
|
||||
|
||||
gDPSetCombineMode:
|
||||
color: ["1", "PRIMITIVE", "TEXEL0_ALPHA", "PRIMITIVE"]
|
||||
|
|
|
@ -25,33 +25,6 @@
|
|||
#define ASPECT_SD 1.333333333333333 // 4:3
|
||||
#define ASPECT_WIDE 1.777777777777778 // 16:9
|
||||
|
||||
void renderPropsInit(struct RenderProps* props, struct Camera* camera, float aspectRatio, struct RenderState* renderState, u16 roomIndex) {
|
||||
props->camera = *camera;
|
||||
props->aspectRatio = aspectRatio;
|
||||
|
||||
cameraSetupMatrices(camera, renderState, aspectRatio, &fullscreenViewport, 1, &props->cameraMatrixInfo);
|
||||
|
||||
props->viewport = &fullscreenViewport;
|
||||
props->currentDepth = gSaveData.controls.portalRenderDepth;
|
||||
props->exitPortalIndex = NO_PORTAL;
|
||||
props->fromRoom = roomIndex;
|
||||
props->parentStageIndex = -1;
|
||||
|
||||
props->clippingPortalIndex = -1;
|
||||
|
||||
props->minX = 0;
|
||||
props->minY = 0;
|
||||
props->maxX = SCREEN_WD;
|
||||
props->maxY = SCREEN_HT;
|
||||
|
||||
props->previousProperties = NULL;
|
||||
props->nextProperites[0] = NULL;
|
||||
props->nextProperites[1] = NULL;
|
||||
|
||||
props->portalRenderType = 0;
|
||||
props->visiblerooms = 0;
|
||||
}
|
||||
|
||||
void renderPropscheckViewportSize(int* min, int* max, int screenSize) {
|
||||
if (*max < MIN_VP_WIDTH) {
|
||||
*max = MIN_VP_WIDTH;
|
||||
|
@ -110,6 +83,34 @@ Vp* renderPropsBuildViewport(struct RenderProps* props, struct RenderState* rend
|
|||
return viewport;
|
||||
}
|
||||
|
||||
void renderPropsInit(struct RenderProps* props, struct Camera* camera, float aspectRatio, struct RenderState* renderState, u16 roomIndex) {
|
||||
props->camera = *camera;
|
||||
props->aspectRatio = aspectRatio;
|
||||
|
||||
cameraSetupMatrices(camera, renderState, aspectRatio, &fullscreenViewport, 1, &props->cameraMatrixInfo);
|
||||
|
||||
props->currentDepth = gSaveData.controls.portalRenderDepth;
|
||||
props->exitPortalIndex = NO_PORTAL;
|
||||
props->fromRoom = roomIndex;
|
||||
props->parentStageIndex = -1;
|
||||
|
||||
props->clippingPortalIndex = -1;
|
||||
|
||||
props->minX = 0;
|
||||
props->minY = 0;
|
||||
props->maxX = SCREEN_WD;
|
||||
props->maxY = SCREEN_HT;
|
||||
|
||||
props->viewport = renderPropsBuildViewport(props, renderState);
|
||||
|
||||
props->previousProperties = NULL;
|
||||
props->nextProperites[0] = NULL;
|
||||
props->nextProperites[1] = NULL;
|
||||
|
||||
props->portalRenderType = 0;
|
||||
props->visiblerooms = 0;
|
||||
}
|
||||
|
||||
void renderPlanFinishView(struct RenderPlan* renderPlan, struct Scene* scene, struct RenderProps* properties, struct RenderState* renderState);
|
||||
|
||||
inline static float getAspect()
|
||||
|
|
Loading…
Reference in a new issue