Jump to content

Why not render directly depth and normal when rendering the color buffer?


BlackMojito
 Share

Recommended Posts

With MRT support, we should be able to render directly color buffer, depth buffer, normal buffer in one pass. Is there a way to implement it? 

With ShaderMaterial, I can write whatever I want but how can I customize Babylonjs (scene, camera etc.) so that I can write to a MultiRenderTarget just as GeometryBufferRenderer? 

I really want to gain every millisecond in my app. Thanks in advance.

Link to comment
Share on other sites

  • 4 weeks later...
On 2018/2/7 at 3:13 AM, Deltakosh said:

Yes no problem but it will only works on Webgl2 :(

You can see how we deal with it here: https://github.com/BabylonJS/Babylon.js/blob/master/src/Rendering/babylon.geometryBufferRenderer.ts

Hi @Deltakosh, I understand the mechanism. My question is actually how I can set the "default" output color buffer of the active scene camera to a MultiRenderTarget? 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...