How should I use/debug a viewport?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By david168

Sorry, I am new to Godot so I think I made a very stupid mistake.

I was trying to make a “page flip” effect for my game. I did some research and decided to do this with a shader. I followed https://github.com/jeremyz/godot-stuff/blob/master/pageflip/pageflip.shader for my shader.

My plan is to run the entire scene in a viewport, get the texture from viewport, and send it into a shader. My code worked, I moved a few nodes around, and it broke again. Nothing shows up on my screen now and the script attached to an object in the viewport is not responding to my inputs (no debug print statements coming out).

I think I am probably using viewport in the wrong way. I did not use a viewport controller because when I use it both the controller object and the texture from shader script showed up on the screen. Am I doing something very stupid here?