Jump to content

Multi-passes rendering


BlackMojito
 Share

Recommended Posts

On 12/9/2017 at 12:41 PM, NasimiAsl said:

** some time we answer a wrong question and find a complicated solution may be most ask a main question why you need  have that kind of scene :) 

Hum...it's kind of hard to explain though. Anyway I am not using render targets to achieve my targets. But I have only one problem for now. It seems that the alpha values of my render targets are always 1.0. How can I output the alpha values though? Do I need to write my own shaders?

Link to comment
Share on other sites

On 12/9/2017 at 12:41 PM, NasimiAsl said:

** some time we answer a wrong question and find a complicated solution may be most ask a main question why you need  have that kind of scene :) 

NasimiAsl,

Thank you for all your help. Now I have worked out what I expected. Actually the only problemI have is that every time I add a new mesh to my selection group/layer, I need to update the Octree otherwise I won't see it. Anyway I will keep my current solution.

Basically

1. first I clone my original selected mesh and apply a base layer selection material.

2. then I add an overlay layer (alpha = 0.2) and render it to a separate render target.

3. Then in the final compose shader, I apply a simple edge detection algorithm.

5a2e1c63480d5_ScreenShot2017-12-11at1_48_13PM.thumb.png.9f045c2f2aaf6614d7aab97f971606e3.png5a2e1c799aa14_ScreenShot2017-12-11at1_47_45PM.thumb.png.3022831bd3e3eafed11984c89fe2b768.png5a2e1c799aa14_ScreenShot2017-12-11at1_47_45PM.thumb.png.3022831bd3e3eafed11984c89fe2b768.png

Link to comment
Share on other sites

20 hours ago, Arte said:

Hi @BlackMojito

"Then in the final compose shader, I apply a simple edge detection algorithm"    Can you share simple edge detection algorithm? :)

Hi Arte,

I am sorry because I am not allowed to share my code for now. Hum...but actually it is just a Sorbel edge detector. You have bunch of information on the Internet. :D

Link to comment
Share on other sites

@Arte

https://www.babylonjs-playground.com/#1JUXK5#54

https://www.babylonjs-playground.com/#1JUXK5#53

ask anything you like to do my friend :D  

https://www.babylonjs-playground.com/#1JUXK5#55

https://www.babylonjs-playground.com/#1JUXK5#57  

you can use highlight layer too  i think

@Deltakosh i think Postprocess have some bug after add any postprocess some effect is gone ( maybe fxaa  )

https://www.babylonjs-playground.com/#1JUXK5#58 no post process 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...