Skip to content

Commit

Permalink
quick upscale fix
Browse files Browse the repository at this point in the history
  • Loading branch information
N8 committed Jul 22, 2023
1 parent 189e4aa commit 99b3f5e
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 5 deletions.
14 changes: 14 additions & 0 deletions dist/N8AO.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/N8AO.js.map

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions example/N8AO.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/N8AO.js.map

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions example_postprocessing/N8AO.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example_postprocessing/N8AO.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8ao",
"version": "1.6.7",
"version": "1.6.8",
"description": "An efficient and visually pleasing implementation of SSAO with an emphasis on temporal stability and artist control.",
"main": "dist/N8AO.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/DepthDownSample.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const DepthDownSample = {
'projectionMatrixInv': { value: new THREE.Matrix4() },
'logDepth': { value: false },
},
depthWrite: false,
depthTest: false,

vertexShader: /* glsl */ `
varying vec2 vUv;
void main() {
Expand Down
9 changes: 9 additions & 0 deletions src/EffectCompositer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const EffectCompositer = {
'colorMultiply': { value: true }

},
depthWrite: false,
depthTest: false,

vertexShader: /* glsl */ `
varying vec2 vUv;
void main() {
Expand Down Expand Up @@ -195,6 +198,12 @@ const EffectCompositer = {
vec4 texel = texture2D(tDiffuse, vUv);
#endif
#ifdef LOGDEPTH
texel.a = clamp(texel.a, 0.0, 1.0);
if (texel.a == 0.0) {
texel.a = 1.0;
}
#endif
float finalAo = pow(texel.a, intensity);
float fogFactor;
Expand Down
3 changes: 2 additions & 1 deletion src/EffectShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const EffectShader = {
'ortho': { value: false },
'screenSpaceRadius': { value: false }
},

depthWrite: false,
depthTest: false,
vertexShader: /* glsl */ `
varying vec2 vUv;
void main() {
Expand Down
3 changes: 3 additions & 0 deletions src/PoissionBlur.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const PoissionBlur = {
'logDepth': { value: false },
'screenSpaceRadius': { value: false }
},
depthWrite: false,
depthTest: false,

vertexShader: /* glsl */ `
varying vec2 vUv;
void main() {
Expand Down

0 comments on commit 99b3f5e

Please sign in to comment.