Kesshi Posted May 31, 2016 Share Posted May 31, 2016 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: Quote Link to comment Share on other sites More sharing options...
Kesshi Posted May 31, 2016 Author Share Posted May 31, 2016 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 31, 2016 Share Posted May 31, 2016 Hey! Number1 is "kind of a bug" 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 Kesshi 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 31, 2016 Share Posted May 31, 2016 Question 2 is now fixed as well with a new parameter to the LONG list of parameter you can use with RenderTargetTexture: http://babylonjs-playground.com/#1HL20V#12 Quote Link to comment Share on other sites More sharing options...
Kesshi Posted May 31, 2016 Author Share Posted May 31, 2016 Thank you. I think you are like me. I hate bugs and like to fix them as fast as possible Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 31, 2016 Share Posted May 31, 2016 Definitely! 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.