Skip to content

Commit

Permalink
solid flat geometry on top of 3d geometry might not be fully visible
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Aug 17, 2023
1 parent 9181467 commit a32f16f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/display/src/displays/webgl/GLRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,11 @@ export class GLRender implements BasicRender {

let executePass = program.initPass(pass, buffer);

if (isOnTopOf3d && buffer.pass == PASS.OPAQUE) {
// opaque flat geometry that is on top of 3d must be drawn in alpha pass.
executePass = pass == PASS.ALPHA;
}

if (executePass) {
// initialize shared uniforms
const {sharedUniforms} = this;
Expand Down

0 comments on commit a32f16f

Please sign in to comment.