Skip to content

Commit

Permalink
Reverting Firefox OIT Fix #4815
Browse files Browse the repository at this point in the history
  • Loading branch information
squrki committed Sep 19, 2024
1 parent 6e0488a commit 8152820
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/engine/Source/Scene/OIT.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,13 @@ function updateTextures(oit, context, width, height) {
pixelDatatype: PixelDatatype.FLOAT,
});

// Use zeroed arraybuffer instead of null to initialize texture
// to workaround Firefox. Only needed for the second color attachment.
const source = new Float32Array(width * height * 4);
oit._revealageTexture = new Texture({
context: context,
pixelFormat: PixelFormat.RGBA,
pixelDatatype: PixelDatatype.FLOAT,
source: {
arrayBufferView: source,
width: width,
height: height,
},
flipY: false,
width: width,
height: height,
flipY: false
});
}

Expand Down

0 comments on commit 8152820

Please sign in to comment.