WhitestormJS / whs.js

:rocket: ๐ŸŒช Super-fast 3D framework for Web Applications ๐Ÿฅ‡ & Games ๐ŸŽฎ. Based on Three.js
MIT License
6.15k stars 391 forks source link

A Module for Wagner PostEffects #191

Open sasha240100 opened 7 years ago

sasha240100 commented 7 years ago

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()
  ])
])

And methods:

Version:
Issue type:

Tested on: ###### Desktop - [ ] Chrome - [ ] Chrome Canary - [ ] Chrome dev-channel - [ ] Firefox - [ ] Opera - [ ] Microsoft IE - [ ] Microsoft Edge ###### Android - [ ] Chrome - [ ] Firefox - [ ] Opera ###### IOS - [ ] Chrome - [ ] Firefox - [ ] Opera
thejmazz commented 7 years ago

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 commented 7 years ago

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

sasha240100 commented 7 years ago

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

thejmazz commented 7 years ago

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.

sasha240100 commented 7 years ago

@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.

edwinwebb commented 7 years ago

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.

sasha240100 commented 7 years ago

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

edwinwebb commented 7 years ago

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

hirako2000 commented 7 years ago

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

noahcoetsee commented 6 years ago

@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

sasha240100 commented 6 years ago

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 notifications@github.com 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 .

noahcoetsee commented 6 years ago

Awesome! What PP module are you on now?

sasha240100 commented 6 years ago

Take a look at PostProcessorModule in sources

On Fri, Mar 2, 2018 at 6:09 PM Noah notifications@github.com 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 .

noahcoetsee commented 6 years ago

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

sasha240100 commented 6 years ago

Sounds good. Ping me there

On Fri, Mar 2, 2018 at 8:49 PM Noah notifications@github.com 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 .