whs.js icon indicating copy to clipboard operation
whs.js copied to clipboard

A Module for Wagner PostEffects

Open sasha240100 opened this issue 7 years ago โ€ข 15 comments

Wagner has lots of cool post-processing effects and shaders. I'd like to see them implemented as a module for App.

image

Concept

const app = new WHS.App([
  // ...
  new WagnerModule([
    new WAGNER.ZoomBlurPass(),
    new WAGNER.MultiPassBloomPass()
  ])
])
  • [ ] Working concept.
  • [ ] Support for advanced passes.

And methods:

  • [ ] .addPass(pass) - adds pass to composer.
  • [ ] .removePass(passName) - removes pass.
  • [ ] .togglePass(passName) - I'd like to see this feature. Turns on/off the pass
Version:
  • [x] v2.x.x
  • [ ] v1.x.x
Issue type:
  • [ ] Bug
  • [x] Proposal/Enhancement
  • [ ] Question

Tested on:
Desktop
  • [ ] Chrome
  • [ ] Chrome Canary
  • [ ] Chrome dev-channel
  • [ ] Firefox
  • [ ] Opera
  • [ ] Microsoft IE
  • [ ] Microsoft Edge
Android
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera
IOS
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera

sasha240100 avatar Mar 12 '17 19:03 sasha240100

Instead, maybe abstract it so PP passes can take in fragment shader code

As opposed to defining a key in some module for all these passes

thejmazz avatar Mar 12 '17 19:03 thejmazz

However, looking at wagner API, maybe I spoke too soon

thejmazz avatar Mar 12 '17 19:03 thejmazz

@thejmazz It has a lot of effects that we can use. Already implemented! i like that. So simple

sasha240100 avatar Mar 12 '17 19:03 sasha240100

the source of our current PostProcessorModule is very similar to that of Wagner. I suspect ours came from THREE.EffectComposer, which Wagner is built on. Might be worthwhile to deprecate PostProcessorModule and have a wagner module instead.

thejmazz avatar Mar 12 '17 19:03 thejmazz

@thejmazz If we can compare the code. I mean which implementation is better - yes, let's do that. I want to have a simpler and more flexible implementation. Also consider adding .togglePass() option.

I also have some more ideas in mind that we can add. Some kind of transitions between passes.

sasha240100 avatar Mar 12 '17 19:03 sasha240100

Wagner looks like a complex extension of the EffectComposer. WHS has a pretty much 1:1 port. Still seems to swap a couple of RenderTargets but has been extended with a bunch of extra functions to accommodate the complexities of the bundled filters.

The Wagner bundled filters don't seem to rely on any masking or depth rendering techniques which makes things a lot more simple.

I'd say these filters can be wrapped and delivered with WHS using the current post-processor.

edwinwebb avatar Mar 14 '17 16:03 edwinwebb

@edwinwebb So current PostProcessorModule can replace a possible WagnerModule? Could you do a test, please?

sasha240100 avatar Mar 14 '17 16:03 sasha240100

I'll see what I can do. I've a day job so it's hard to find time for open source. I've been working on something similar here which I hope can provide some shortcuts : https://github.com/edwinwebb/three-seed/blob/master/app/Renderer/EffectRenderer.js

edwinwebb avatar Mar 15 '17 11:03 edwinwebb

is that superseeded with stuff you did with postprocessing @sasha240100 ?

hirako2000 avatar Jun 23 '17 11:06 hirako2000

@sasha240100 I know this is another old Issue, but I'd like to help out with this as well. Since you and hirako are so busy with the editor, I'll be over here maintaining the project :D

noahcoetsee avatar Mar 02 '18 14:03 noahcoetsee

Nice! We now moved to another postprocessing module, but letโ€™s see if we could support Wagner as well

On Fri, Mar 2, 2018 at 4:24 PM Noah [email protected] wrote:

@sasha240100 https://github.com/sasha240100 I know this is another old Issue, but I'd like to help out with this as well. Since you and hirako are so busy with the editor, I'll be over here maintaining the project :D

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WhitestormJS/whs.js/issues/191#issuecomment-369934005, or mute the thread https://github.com/notifications/unsubscribe-auth/AHTX1R03QIvoNkd4iQhVMzNj0l0zqWy8ks5taVYFgaJpZM4Maoqf .

sasha240100 avatar Mar 02 '18 16:03 sasha240100

Awesome! What PP module are you on now?

noahcoetsee avatar Mar 02 '18 16:03 noahcoetsee

Take a look at PostProcessorModule in sources

On Fri, Mar 2, 2018 at 6:09 PM Noah [email protected] wrote:

Awesome! What PP module are you on now?

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WhitestormJS/whs.js/issues/191#issuecomment-369966361, or mute the thread https://github.com/notifications/unsubscribe-auth/AHTX1d-uF3OsX9xqYXRGZAx4epMafa7Bks5taW5kgaJpZM4Maoqf .

sasha240100 avatar Mar 02 '18 16:03 sasha240100

Alright! Also: I do need some help with the Networking Module. I'll discord you about it later!

noahcoetsee avatar Mar 02 '18 18:03 noahcoetsee

Sounds good. Ping me there

On Fri, Mar 2, 2018 at 8:49 PM Noah [email protected] wrote:

Alright! Also: I do need some help with the Networking Module. I'll discord you about it later!

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WhitestormJS/whs.js/issues/191#issuecomment-370016160, or mute the thread https://github.com/notifications/unsubscribe-auth/AHTX1UTSakCrrbnAD8RJWsrVISw_-YSZks5taZQWgaJpZM4Maoqf .

sasha240100 avatar Mar 02 '18 21:03 sasha240100