mirror of
https://github.com/openglobus/openglobus.git
synced 2025-12-08 19:25:27 +00:00
926 added transparent clen up
This commit is contained in:
parent
d29a91095b
commit
c02247c954
@ -56,7 +56,6 @@
|
||||
height: 100%;
|
||||
float: left;
|
||||
position: relative;
|
||||
background-color: black;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@openglobus/og",
|
||||
"version": "0.27.10",
|
||||
"version": "0.27.12",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openglobus/og",
|
||||
"version": "0.27.10",
|
||||
"version": "0.27.12",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
|
||||
@ -217,9 +217,9 @@ class Globe {
|
||||
autoActivate: false,
|
||||
pixelRatio: options.dpi || (window.devicePixelRatio + 0.15),
|
||||
context: {
|
||||
//alpha: false,
|
||||
alpha: true, // turn on for transparent background
|
||||
antialias: false,
|
||||
premultipliedAlpha: false,
|
||||
premultipliedAlpha: true,
|
||||
preserveDrawingBuffer: false
|
||||
}
|
||||
}), {
|
||||
|
||||
@ -1001,7 +1001,7 @@ class Renderer {
|
||||
let h = this.handler,
|
||||
gl = h.gl!;
|
||||
|
||||
gl.clearColor(0.0, 0.0, 0.0, 1.0);
|
||||
gl.clearColor(0.0, 0.0, 0.0, 0.0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
||||
|
||||
this.enableBlendDefault();
|
||||
@ -1110,6 +1110,9 @@ class Renderer {
|
||||
|
||||
this.toneMappingFramebuffer!.activate();
|
||||
|
||||
gl.clearColor(0.0, 0.0, 0.0, 0.0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||
|
||||
sh.activate();
|
||||
|
||||
// screen texture
|
||||
|
||||
@ -48,7 +48,7 @@ in vec2 tc;
|
||||
layout (location = 0) out vec4 fragColor;
|
||||
|
||||
void main(void) {
|
||||
vec4 hdrColor = texture(hdrBuffer, tc).rgba;
|
||||
vec4 hdrColor = texture(hdrBuffer, tc);
|
||||
|
||||
float oneByGamma = gamma / gamma;
|
||||
float oneByWhitePoint = whitepoint / whitepoint;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user