+2 votes

Hello, how would you go about projecting a camera view to a texture

in Engine by (24 points)

1 Answer

+1 vote
    var img =  camera.get_viewport().get_texture().get_data()
    var tex = ImageTexture.new()
    tex.create_from_image(img)
    get_node("c").texture = tex
by (190 points)

ty seems to be working but perfomance is super bad any idea why

in a viewport node you can enable keep3dlinear, and in materials are flags for shaders, test around with those

didnt work for me img and tex = null don't know why

reduce the viewport size, cause get_data() function captures the whole screen and converts it to an image which is a time consuming task.

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 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 webmaster@godotengine.org with your username.