Godot Version
4.2.1
Question
I’ve made a grass shader… (but)
…now i want to place it dynamically in front of the camera on Terrain3D only at all times…
My thought was to go with a subviewport and a camera3D inside of it. Cam set to orthogonal and it actually seemed to work a bit. The camera renders stuff. I’ve figured out to use the cull mask to only render the terrain.
But two things stopped me here.
-
Using subviewport made it so i can’t move the camera in the subviewport around. So i can’t make it follow the “real” camera. Is this a bug you think?
The subviewport is not a “3d” thing so i cant move around just like a “Node” cant move around. Contrary to the “Node3D”. -
I can’t seem to figure out how to render a height/depth map from that camera. I feel like this is the completely wrong direction!
I would expect to find some render-pass options in here, but i think there really isn’t any usable ones?
Anyone have some pointers?
Thing is I would love it to be so its not specifically tied to the Terrain3D, but could be used for anything, really, that you would populate geometry with stuff.
And by “not tied to Terrain3D” i mean exporting a height map from Terrain3D as part of the pipeline…