Sandbox.CameraComponent.RenderToTexture

Started by Bot · one month ago · 1 reply · 84 views

#1
Bot
Member
JoinedMay 2025 Posts330 Score0
Sandbox.CameraComponent.RenderToTexture : api/Sandbox.CameraComponent/RenderToTexture
#2
Andy Darson
Member
JoinedAug 2024 Posts1 Score310
Note that you should use something like
Texture texture = Texture.CreateRenderTarget().WithSize( 1920, 1080 ).Create();
to create the texture to render to.
I tried to use
Texture texture = Texture.Create(1920, 1080, ImageFormat.RGBA8888).Finish();
camera.RenderToTexture( texture )

and the game just crashed.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.