You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple question. I don't see anything about the viewport or examples of it used. My application renders multiple scenes within the same buffer using scissor/viewport. Would love to use this but wanted to ask before I spend any time. Thanks for your time.
@drone1 You can use multiple RenderPass instances to render multiple scenes. Make sure to set RenderPass.clearPass.enabled = false if you want to render the scenes to the same frame buffer. Depending on your use case, your composition may require saving intermediate render results in textures via CopyPass. Blending textures together can be done with TextureEffect.
Thanks for the demo, I've got the feeling that this scissors/viewport example in the codesandbox could be useful to have a screen which would be split. Eg first left third side of the screen with a given EffectPass applied, center third with another, and right third with again another. This should be less performance hungry than doing full-screen RenderPass with different EffectPasses and combining them - for example via a ShaderPass, right?
Tried forking here with viewport [0,0,w,h] and scissors set to half-width, trying to adding different RenderPasses after the scissorPassA/B but is applies to the whole screen for now.
Thanks for getting back, I'll follow the scissor/viewport v7 implementation thread - just thought it could be hacked in the meantime with the current v6 codesandbox, but waiting for proper support in v7 is a great alternative.
And thanks for the awesome work on the postprocessing lib!
Activity
vanruesc commentedon Jul 23, 2022
This is currently not supported, but it can be done with hacks: https://codesandbox.io/s/long-darkness-szcisb?file=/src/App.js
I'll look into options to add automatic support for
WebGLRenderer.setViewportandWebGLRenderer.setScissor.drone1 commentedon Jul 23, 2022
xuchaozou commentedon Jun 25, 2023
Please take a look again. It is multiple cameras rendering the same scene. The specific description and code are in #507 , thank you
drone1 commentedon Jul 5, 2023
vanruesc commentedon Jul 14, 2023
@drone1 You can use multiple
RenderPassinstances to render multiple scenes. Make sure to setRenderPass.clearPass.enabled = falseif you want to render the scenes to the same frame buffer. Depending on your use case, your composition may require saving intermediate render results in textures viaCopyPass. Blending textures together can be done withTextureEffect.jo-chemla commentedon Feb 10, 2024
Thanks for the demo, I've got the feeling that this
scissors/viewportexample in the codesandbox could be useful to have a screen which would be split. Eg first left third side of the screen with a givenEffectPassapplied, center third with another, and right third with again another. This should be less performance hungry than doing full-screen RenderPass with differentEffectPassesand combining them - for example via aShaderPass, right?Tried forking here with viewport [0,0,w,h] and scissors set to half-width, trying to adding different
RenderPassesafter thescissorPassA/Bbut is applies to the whole screen for now.vanruesc commentedon Feb 12, 2024
@jo-chemla Proper support for scissor/viewport settings is planned for v7.
Closing this in favor of #570.
jo-chemla commentedon Feb 12, 2024
Thanks for getting back, I'll follow the scissor/viewport v7 implementation thread - just thought it could be hacked in the meantime with the current v6 codesandbox, but waiting for proper support in v7 is a great alternative.
And thanks for the awesome work on the
postprocessinglib!