Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox OIT fix #4762

Merged
merged 4 commits into from
Dec 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Change Log
* Added `WebGLConstants` enum. Previously, this was part of the private Renderer API. [#4731](https://github.com/AnalyticalGraphicsInc/cesium/pull/4731)
* Fixed an bug that caused `GroundPrimitive` to render incorrectly on systems without the `WEBGL_depth_texture` extension. [#4747](https://github.com/AnalyticalGraphicsInc/cesium/pull/4747)
* Fixed default Mapbox token and added a watermark to notify users that they need to sign up for their own token.
* Fixed translucency in Firefox 50. https://github.com/AnalyticalGraphicsInc/cesium/pull/4762

### 1.28 - 2016-12-01

Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/FXAA.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ define([
pixelDatatype : PixelDatatype.UNSIGNED_BYTE
});

if (context.depthStencilTexture) {
if (context.depthTexture) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related - but a mistake from a search and replace I did in #4747

this._depthStencilTexture = new Texture({
context : context,
width : width,
Expand Down
22 changes: 16 additions & 6 deletions Source/Scene/OIT.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,29 @@ define([
function updateTextures(oit, context, width, height) {
destroyTextures(oit);

// Use zeroed arraybuffer instead of null to initialize texture
// to workaround Firefox 50. https://github.com/AnalyticalGraphicsInc/cesium/pull/4762
var source = new Float32Array(width * height * 4);

oit._accumulationTexture = new Texture({
context : context,
width : width,
height : height,
pixelFormat : PixelFormat.RGBA,
pixelDatatype : PixelDatatype.FLOAT
pixelDatatype : PixelDatatype.FLOAT,
source : {
arrayBufferView : source,
width : width,
height : height
}
});
oit._revealageTexture = new Texture({
context : context,
width : width,
height : height,
pixelFormat : PixelFormat.RGBA,
pixelDatatype : PixelDatatype.FLOAT
pixelDatatype : PixelDatatype.FLOAT,
source : {
arrayBufferView : source,
width : width,
height : height
}
});
}

Expand Down