BitOfGold

Possible to render only to RenderTarget? [LudumDare]

3 posts in this topic

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.