Jump to content

PostProcessing with multiple cameras


Kesshi
 Share

Recommended Posts

Hi,
in this playground ( http://babylonjs-playground.com/#1HL20V#2 ) i have 2 cameras/viewports. I want to make postprocessing for each of those cameras independently. For each camera i have a rendertarget and a postprocess. The problem is that its only working for the last camera (cameraRight in the playground).
Somehow the rendertargert doesn't contain the correct image.
If you disable the right camera (comment out line 28 - 42) the left one starts working. Is this a bug or is it not ok to use rendertargets like this?

If the postprocessing is working correctly the result should look like this:
screenshot.JPG

Link to comment
Share on other sites

Another related question:
How can i create an non power of two render target and use it for post-processing?
I cant get it to work. I tried changing the sample mode to NEAREST already using updateSamplingMode but that doesn't help. (The sampling mode parameter for RenderTargetTexture is missing).
Here a playground: http://babylonjs-playground.com/#1HL20V#4

Link to comment
Share on other sites

Hey!

Number1 is "kind of a bug" :D

Actually you use the renderTarget as source for the postprocess used by camera1 and camera1 is used by rendertarget so it's kind of chicken and eggs

I've just added a boolean (useCameraPostprocesses) to prevent renderTarget to automatically use postprocess from their cam: 

http://babylonjs-playground.com/#1HL20V#9

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