Git Product home page Git Product logo

Comments (9)

N8python avatar N8python commented on August 23, 2024 1

Yes, I could modulate the effect by fog. This feature will be added in the next update.

from n8ao.

N8python avatar N8python commented on August 23, 2024

Fog has been added - let me know if its working.

from n8ao.

LukeCarlThompson avatar LukeCarlThompson commented on August 23, 2024

Nice one! It's working perfectly and blending in with the fog.

However there does appear to be a new side effect when working with the pmndrs post processing library using a bloom pass.

Previously I would do a renderPass, then the N8AOPostPass then the post processing effect pass that contained a bloom effect and it all worked together well but the AO effect just displayed over the fog.

Now with the same workflow the AO effect blends in perfectly with the fog, but it seems to disable the bloom effect, the other post processing effect passes still seem to work and there is no error shown in the console.

Not sure if this is actually an issue, but I thought I'd let you know.

Below is a link to my WIP game which has the effects applied.

https://swimmy-fish.lukethompson.com.au/#debug

Let me know if it would be useful and I'll create a minimum example to reproduce the behaviour.

from n8ao.

N8python avatar N8python commented on August 23, 2024
Screen Shot 2023-06-13 at 11 31 23 AM Here's a picture of (overdone) bloom working with N8AOPass... try updating to 1.6.1.

A minimal example would be helpful!

from n8ao.

N8python avatar N8python commented on August 23, 2024

Try - instead of this:
this.effectPass = new gD(this.camera,this.aaEffect,this.brightnessContrastEffect,this.bloomEffect),
This:
this.effectPass = new gD(this.camera,this.brightnessContrastEffect,this.bloomEffect, this.aaEffect),

As the AA effect should come after everything.

BTW this works with the latest version:

   const composer = new EffectComposer(renderer);
   composer.addPass(new RenderPass(scene, camera));
   const n8aopass = new N8AOPostPass(
       scene,
       camera,
       clientWidth,
       clientHeight
   );
   composer.addPass(n8aopass);
   composer.addPass(new EffectPass(camera, new BloomEffect({
       luminanceThreshold: 0.0,
       intensity: 5.0
   }), new SMAAEffect({
       preset: SMAAPreset.ULTRA
   })));

from n8ao.

LukeCarlThompson avatar LukeCarlThompson commented on August 23, 2024

Thank you for that. I see what the difference is now.

I'm using a selective bloom technique where I set the bloom effect luminance threshold to 1 and then set the materials I want bloom on to be toneMapped: false and the emissiveIntensity to a high value like 8. Then only those objects will have the bloom effect applied. Could it be that because the N8aopass goes first it renders a tone mapped output or some other way of clipping the colours back into the normal range of 0 - 1?

If you try this code sandbox and comment out the aoPass on line 79 you will see the bloom effect is visible again.

https://codesandbox.io/s/sparkling-cdn-qslj6y?file=/src/index.js

from n8ao.

N8python avatar N8python commented on August 23, 2024

N8AO uses non-float render targets... that could definitely be the problem. Next update (will be released tonight/early tmrw) will add support for floating render targets.

from n8ao.

N8python avatar N8python commented on August 23, 2024

Should be fixed now.

from n8ao.

LukeCarlThompson avatar LukeCarlThompson commented on August 23, 2024

Yep, it's working great. Thanks so much really appreciate the great work and fast updates!

from n8ao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.