|
@@ -1,5 +1,5 @@
|
|
|
import { AdditiveBlending, Color, Vector2, RendererUtils, PassNode, QuadMesh, NodeMaterial } from 'three/webgpu';
|
|
import { AdditiveBlending, Color, Vector2, RendererUtils, PassNode, QuadMesh, NodeMaterial } from 'three/webgpu';
|
|
|
-import { nodeObject, uniform, mrt, texture, getTextureIndex } from 'three/tsl';
|
|
|
|
|
|
|
+import { nodeObject, uniform, mrt, texture, getTextureIndex, unpremultiplyAlpha } from 'three/tsl';
|
|
|
|
|
|
|
|
const _size = /*@__PURE__*/ new Vector2();
|
|
const _size = /*@__PURE__*/ new Vector2();
|
|
|
|
|
|
|
@@ -277,11 +277,11 @@ class SSAAPassNode extends PassNode {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this._quadMesh.material = new NodeMaterial();
|
|
this._quadMesh.material = new NodeMaterial();
|
|
|
- this._quadMesh.material.fragmentNode = sampleTexture;
|
|
|
|
|
|
|
+ this._quadMesh.material.fragmentNode = unpremultiplyAlpha( sampleTexture );
|
|
|
this._quadMesh.material.transparent = true;
|
|
this._quadMesh.material.transparent = true;
|
|
|
this._quadMesh.material.depthTest = false;
|
|
this._quadMesh.material.depthTest = false;
|
|
|
this._quadMesh.material.depthWrite = false;
|
|
this._quadMesh.material.depthWrite = false;
|
|
|
- //this._quadMesh.material.premultipliedAlpha = true;
|
|
|
|
|
|
|
+ this._quadMesh.material.premultipliedAlpha = true;
|
|
|
this._quadMesh.material.blending = AdditiveBlending;
|
|
this._quadMesh.material.blending = AdditiveBlending;
|
|
|
this._quadMesh.material.name = 'SSAA';
|
|
this._quadMesh.material.name = 'SSAA';
|
|
|
|
|
|