Skip to content

Commit

Permalink
Wind Waker: Use computeModelMatrixT to avoid list creation
Browse files Browse the repository at this point in the history
  • Loading branch information
themikelester committed Jan 4, 2025
1 parent d39b97a commit b1099c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ZeldaWindWaker/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { J3DModelInstance } from '../Common/JSYSTEM/J3D/J3DGraphBase.js';
import * as JPA from '../Common/JSYSTEM/JPA.js';
import { BTIData } from '../Common/JSYSTEM/JUTTexture.js';
import { dfRange } from '../DebugFloaters.js';
import { range } from '../MathHelpers.js';
import { computeModelMatrixT, range } from '../MathHelpers.js';
import { SceneContext } from '../SceneBase.js';
import { TextureMapping } from '../TextureHolder.js';
import { setBackbufferDescSimple, standardFullClearRenderPassDescriptor } from '../gfx/helpers/RenderGraphHelpers.js';
Expand Down Expand Up @@ -419,10 +419,11 @@ export class WindWakerRenderer implements Viewer.SceneGfx {
// From mDoGph_Painter(). Draw the 2D particle groups with different view/proj matrices.
{
const orthoCtx = this.globals.scnPlay.currentGrafPort;
const viewMtx = mat4.fromTranslation(scratchMatrix, [orthoCtx.aspectRatioCorrection * 320, 240, 0]);
const template = renderInstManager.pushTemplate();
orthoCtx.setOnRenderInst(template);

const viewMtx = scratchMatrix;
computeModelMatrixT(viewMtx, orthoCtx.aspectRatioCorrection * 320, 240, 0);
globals.particleCtrl.setDrawInfo(viewMtx, orthoCtx.sceneParams.u_Projection, null, null);

renderInstManager.setCurrentList(dlst.particle2DBack);
Expand Down

0 comments on commit b1099c1

Please sign in to comment.