Kesshi Posted May 12, 2016 Share Posted May 12, 2016 Hi,@NasimiAsl posted a nice outline effect some time ago ( http://www.html5gamedevs.com/topic/22203-shaderbuilder-documentation/#comment-126596 ) But the perfomance is very bad on my old IPad (only 2 FPS), so i created one my self:http://www.babylonjs-playground.com/#24758V#0 with my version i get 28 FPS on my IPad I'm very happy already with the result. There is only one thing i don't like. Because i use postprocessing i lose the hardware antialiasing. My idea is now to use the resulting outline from the postprocessing and render it as an transparent overlay/layer on top of the anitaliased scene. I did the same thing already with ThreeJs but somehow i don't know how to do it with BabylonJs. Does someone has an idea how to do this? I could use FXAA but hardware antialiasing still looks better. iiceman, adam and NasimiAsl 3 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 12, 2016 Share Posted May 12, 2016 yes this is a webgl constraint (no AA inside a render target) to do a transparent overlay on top of your scene, you can do this:http://www.babylonjs-playground.com/#24758V#1 NasimiAsl and Kesshi 2 Quote Link to comment Share on other sites More sharing options...
Kesshi Posted May 12, 2016 Author Share Posted May 12, 2016 Thx a lot. I was playing around with the alpha mode already. Seems like i didnt set it at the correct place. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 14, 2016 Share Posted May 14, 2016 i fix some bug and use your sample for smooth http://www.babylonjs-playground.com/#1TYWYB#56 http://www.babylonjs-playground.com/#1TYWYB#55 http://www.babylonjs-playground.com/#1TYWYB#57 can test it in your IPad thanks @Kesshi @iiceman : i think you need to look this post adam, iiceman and GameMonetize 3 Quote Link to comment Share on other sites More sharing options...
iiceman Posted May 14, 2016 Share Posted May 14, 2016 Pretty cool, good job guys! I have been looking for this for quite a while now! Quote Link to comment Share on other sites More sharing options...
Kesshi Posted May 17, 2016 Author Share Posted May 17, 2016 @NasimiAsl i made a test on my IPad: #56 = 8 fps #55 = 11 fps #57 = 11 fps Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 17, 2016 Share Posted May 17, 2016 thanks Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 17, 2016 Share Posted May 17, 2016 3 hours ago, Kesshi said: @NasimiAsl i made a test on my IPad: #56 = 8 fps #55 = 11 fps #57 = 11 fps i realy sorry i ask again can you test it in your device http://www.babylonjs-playground.com/#1TYWYB#63 http://www.babylonjs-playground.com/#1TYWYB#65 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 17, 2016 Share Posted May 17, 2016 @Deltakosh any way to use transparency in RenderTarget Please Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 17, 2016 Share Posted May 17, 2016 Not sure to understand..but you can use the rendertargettexture in the opacitytexture channel of your material Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 4, 2016 Share Posted July 4, 2016 I'm playing with the playground from the original poster. Trying to get different highlighting colours at the same time, in this case green and red. I can't get it working though. I think I've wrecked it :/ Here's my attempt: http://www.babylonjs-playground.com/#24758V#3 Does anyone know how I can get a green and red outline on the sphere and box? Quote Link to comment Share on other sites More sharing options...
Kesshi Posted July 4, 2016 Author Share Posted July 4, 2016 3 hours ago, ozRocker said: I'm playing with the playground from the original poster. Trying to get different highlighting colours at the same time, in this case green and red. I can't get it working though. I think I've wrecked it :/ Here's my attempt: http://www.babylonjs-playground.com/#24758V#3 Does anyone know how I can get a green and red outline on the sphere and box? i hacked something together, something like this? http://www.babylonjs-playground.com/#24758V#4 NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 5, 2016 Share Posted July 5, 2016 7 hours ago, Kesshi said: i hacked something together, something like this? http://www.babylonjs-playground.com/#24758V#4 Awesome! Thanx mate. I tried adding a transparent overlay to get anti-aliasing happening but it doesn't seem to be working. I added the code that @Deltakosh used http://www.babylonjs-playground.com/#24758V#5 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 5, 2016 Share Posted July 5, 2016 I got it working! http://www.babylonjs-playground.com/#24758V#7 so I'm not completely useless when it comes to shaders lol Just wondering, does an extra camera affect performance? 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.