NasimiAsl Posted December 9, 2017 Share Posted December 9, 2017 ** 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 Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 10, 2017 Author Share Posted December 10, 2017 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? Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 11, 2017 Author Share Posted December 11, 2017 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. Arte 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 13, 2017 Share Posted December 13, 2017 so nice you do it or you have any problem? Quote Link to comment Share on other sites More sharing options...
Arte Posted December 13, 2017 Share Posted December 13, 2017 Hi @BlackMojito "Then in the final compose shader, I apply a simple edge detection algorithm" Can you share simple edge detection algorithm? Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 14, 2017 Author Share Posted December 14, 2017 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. Arte 1 Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 14, 2017 Author Share Posted December 14, 2017 21 hours ago, NasimiAsl said: so nice you do it or you have any problem? Hi NasimiAsl, No I have no problem anymore. Thanks you again for your support. Without you this cannot be done. NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 14, 2017 Share Posted December 14, 2017 @Arte https://www.babylonjs-playground.com/#1JUXK5#54 https://www.babylonjs-playground.com/#1JUXK5#53 ask anything you like to do my friend 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 Arte 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.