Jump to content

Possible to render only to RenderTarget? [LudumDare]


BitOfGold
 Share

Recommended Posts

Hi folks!

LudumDare starts in a day, and I'm in a hurry to prepare...

I'm planning to use this Quake-ish, glitchy, dithered, scanlined postprocess shader I wrote today:
http://www.babylonjs-playground.com/index.html#CGGTIB#104

Is it possible to render a scene only to the RenderTarget, without rendering to a full scale backbuffer?
BTW will any of you participate in LudumDare jam or compo?

Link to comment
Share on other sites

Hey good luck!

so no problem to render only to your renderTarget. Just call renderTarget.render() and do not call scene.render():

https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/babylon.renderTargetTexture.ts#L224

Example here:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tools.ts#L793

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...