Mick Posted December 18, 2013 Share Posted December 18, 2013 Hi all, I'm actually working on a post prod effect and I need depth texture and normal texture of my scene.I've already create normal and depth material and i just need to render my scene into a texture.Is there any way to do that with babylonJS ? Thanks,Mick Nico 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 18, 2013 Share Posted December 18, 2013 Sure:) you can use a postprocess for that:https://github.com/BabylonJS/Babylon.js/wiki/How-to-use-postprocesses But you can also create a BABYLON.RenderTargetTexture, specify the list of objects to render in it with the renderList property and finally register it to the scene with scene.customRenderTargets The code should be like this:var texture = new BABYLON.RenderTargetTexture("tex", 512, scene);texture.renderList.push(myMesh);scene.customRenderTargets.push(texture) Quote Link to comment Share on other sites More sharing options...
Mick Posted December 18, 2013 Author Share Posted December 18, 2013 Thanks for your fast answer, I'll try that . Quote Link to comment Share on other sites More sharing options...
mmangual83 Posted April 27, 2015 Share Posted April 27, 2015 This question is for you: @Deltakosh Can you render a video onto a texture? I want to display a video loop to a tv screen texture. I was wondering if that was possible. Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 27, 2015 Share Posted April 27, 2015 A demo of video texture - http://www.babylonjs-playground.com/#EKFLA GameMonetize 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.