GameMonetize Posted October 23, 2017 Share Posted October 23, 2017 Sure thing:) You can also add some playground here: https://github.com/BabylonJS/Babylon.js/tree/master/tests/validation So they will be part of our visual testing process NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 23, 2017 Share Posted October 23, 2017 so let we start working on that *** and i find some serious bug( maybe ) in standard material for update uniform i think custom material inherit that too Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 24, 2017 Share Posted October 24, 2017 test.zip this is with old version of custom material Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 24, 2017 Share Posted October 24, 2017 hi @Deltakosh how can i get the old version of Custommaterial from GitHub Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 26, 2017 Share Posted October 26, 2017 go to the custommaterial.ts page. There is an history button Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 26, 2017 Author Share Posted December 26, 2017 I have successfully to add multiple clipping planes by using CutomMaterial. However I have got further problems. I am using SSAO2 and it uses the GeometryBufferRenderer which can output a Depth texture and a Normal texture. BUT the buffers do not take into account the clipping planes so that I will get shadow where it should not. I understand that I need to customize the shaders so that I can insert necessary uniform variables and clipping plane logic. But HOW CAN I DO THAT? I tried to inherit from GeometryBufferRenderer and would like to override its internal effects but there were too many private variables. And even if I can do it, I need to replace the default GeometryBufferRenderer in the Scene class. This is also not possible as it was a private member... Help needed! Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 26, 2017 Author Share Posted December 26, 2017 I am writing buy program in TypeScript. So maybe the only is to hack babylon.d.ts and make the variables public/protected? Then I need to do this for every update...... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 26, 2017 Share Posted December 26, 2017 Hello the simplest hack would be to replace BABYLON.Effect.ShadersStore["geometryPixelShader"] by the string of your own shader The original string is:https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/geometry.fragment.fx Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 26, 2017 Author Share Posted December 26, 2017 5 hours ago, Deltakosh said: Hello the simplest hack would be to replace BABYLON.Effect.ShadersStore["geometryPixelShader"] by the string of your own shader The original string is:https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/geometry.fragment.fx Yeah but how can I update the internal effect each time the uniforms(planes) should be modified? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 27, 2017 Share Posted December 27, 2017 You can add code to material.onBindObservable and get material.getEffect() to set the values you want Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 28, 2017 Author Share Posted December 28, 2017 9 hours ago, Deltakosh said: You can add code to material.onBindObservable and get material.getEffect() to set the values you want Hum....but GeomertryBufferRenderer is not a Material. It holds directly a private "Effect". I cannot get it...as...it is private. And the GeometryBufferRenderer inside Scene is also private... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 28, 2017 Share Posted December 28, 2017 True But if you are using JS, you can still reach private values. Don't get me wrong here, we are doing a big hack since the beginning NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 29, 2017 Author Share Posted December 29, 2017 9 hours ago, Deltakosh said: True But if you are using JS, you can still reach private values. Don't get me wrong here, we are doing a big hack since the beginning What if we make them protected in the future release? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 29, 2017 Share Posted December 29, 2017 Not a problem You can even submit a PR that I will be glad to merge 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.