Skip to content

Commit

Permalink
add per-drawable projections
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings authored Sep 25, 2024
1 parent 9d343f3 commit 549d567
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/RenderWebGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -2245,9 +2245,15 @@ class RenderWebGL extends EventEmitter {
currentShader = newShader;
gl.useProgram(currentShader.program);
twgl.setBuffersAndAttributes(gl, currentShader, this._bufferInfo);
Object.assign(uniforms, {
u_projectionMatrix: projection
});
if (drawable.projection && drawMode !== 'straightAlpha' {
Object.assign(uniforms, {
u_projectionMatrix: drawable.projection
});
} else {
Object.assign(uniforms, {
u_projectionMatrix: projection
});
}
}

Object.assign(uniforms,
Expand Down

0 comments on commit 549d567

Please sign in to comment.