Godot Version
4.5.2
Question
How do I get the render from a camera and insert it into my shader:
For context I’m using a bunch of images to get a screen tear/manga panel effect similar to Persona 5
But rather than an image in the white space of my png’s I want to use the render from a camera in my 3d scene. I do need the camera render to be updated every frame so the image always matches whats being animated. I’ve currently got everything I need to get the effect except the render image from the camera, just need to get it and plug it into the slot indicated by the purple arrow.
Add a Texture2DParameter node and change the Source to Screen.
1 Like
Thanks for the reply, I’m sorry I failed to mention this is for a colour rect nodes shader and the camera I need the render from is not the current camera.
So I’ve set this up:
How do I get the non current camera render?
Assign a viewport texture to the parameter in the inspector under shader parameters of your material. Your camera needs to render to a sub viewport.
1 Like
I’m not seeing a parameter for the texture, ive refreshed the ui by switching off and back
You need to have a Texture2DParameter node in the shader network.
Post the shader network, preferably at readable size.
There is a texture2dparameter in the top left, let me know if you need it less dense
If it’s connected to the final output it should appear in parameters. Make sure that you’re looking at the correct shader/material in the inspector.
EDIT: Source should be set to “None”
2 Likes
Thanks for the help both of you. It works and its gorgeous!
1 Like
Mind if we get a screenshot of that? I want to see how good it looks!
1 Like
Yeah sure, give me half an hour I want to set up the animations first for the tears. :£
(Please ignore my models animations, i’m currently working on it in blender and that’s just a place holder to help figure out timings, so is the cameras)
3 Likes