0 votes

Hello everyone!

Is there a way to:

Update and render a single Viewport via GDScript?

Currently I'm struggling to make following scenario work:
I have a camera inside a viewport which should render into the viewport in N number of steps. In each step it should either change its transform or change its near / far properties. And in each step I want to change some materials in the world. Then for each step it should render into the viewport while keeping what has already been rendered into the viewport.

The final result of the viewport should be a world layered (by changed near / far clipping) and materials of the world.

Can someone help me understand how to have control over viewports? Currently it more feels like they do what they want to do without being able to force update single viewports.

Thank you! <3

in Engine by (28 points)
edited by

it should render into the viewport while keeping what has already been rendered into the viewport

What do you mean by this? How many viewports are you working with?

Currently (it's about portals) I have only two Viewports.

I try to work out the solution of this coding adventure
but for Godot.

But there's no obvious way to me like in Unity where it's just a call:




which will keep previous buffer information (like depth and color), except the viewport is cleared by method or so.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.