tooyamk Posted July 23, 2018 Share Posted July 23, 2018 like unity : camera.render(customShader) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 23, 2018 Share Posted July 23, 2018 https://doc.babylonjs.com/how_to/how_to_use_postprocesses Quote Link to comment Share on other sites More sharing options...
tooyamk Posted July 23, 2018 Author Share Posted July 23, 2018 3 hours ago, Pryme8 said: https://doc.babylonjs.com/how_to/how_to_use_postprocesses PostProcess is different. I need temporary replace shaders of meshes, so i don't know if there is a simple method. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 23, 2018 Share Posted July 23, 2018 prolly is. We just need you to describe your end goal a little better. cause I mean you can use before and after Camera render callbacks, to toggle what ever shaders you need for what ever purpose. But we kinda need more info, we dont see what you see in your head. Quote Link to comment Share on other sites More sharing options...
tooyamk Posted July 23, 2018 Author Share Posted July 23, 2018 22 minutes ago, Pryme8 said: prolly is. We just need you to describe your end goal a little better. cause I mean you can use before and after Camera render callbacks, to toggle what ever shaders you need for what ever purpose. But we kinda need more info, we dont see what you see in your head. I need at each frame use a custom shander render meshes to a rendertexture, like depthbuffer. Unity has a simple method, camera.renderWIthShader(customShader), so i dont know bjs whether there is also a simple method, otherwise the only manual management. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 23, 2018 Share Posted July 23, 2018 https://doc.babylonjs.com/api/classes/babylon.rendertargettexture This or post proccess Quote Link to comment Share on other sites More sharing options...
tooyamk Posted July 23, 2018 Author Share Posted July 23, 2018 5 minutes ago, Pryme8 said: https://doc.babylonjs.com/api/classes/babylon.rendertargettexture This or post proccess My problem is't render to texture. But in your link, i found RenderTargetTexture has customRenderFunction method, maybe able to realize my needs. Thank you Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 23, 2018 Share Posted July 23, 2018 Yeah, this stuff is kinda gray area for me I just hack around with it or ask @Deltakosh till I get it right. I’ve done what you are asking before but don’t have access the the example at the moment. If you are not able to figure it out reping me and I’ll look for the example. Quote Link to comment Share on other sites More sharing options...
tooyamk Posted July 23, 2018 Author Share Posted July 23, 2018 8 minutes ago, Pryme8 said: Yeah, this stuff is kinda gray area for me I just hack around with it or ask @Deltakosh till I get it right. I’ve done what you are asking before but don’t have access the the example at the moment. If you are not able to figure it out reping me and I’ll look for the example. Ok, I will try, Thank you for your help Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 23, 2018 Share Posted July 23, 2018 https://www.babylonjs-playground.com/#6LGN7K Quote Link to comment Share on other sites More sharing options...
Guest Posted July 24, 2018 Share Posted July 24, 2018 Or that: http://www.babylonjs.com/demos/customrendertarget/ 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.