trophy 0
May 2025 321 posts
Sandbox.CameraComponent.RenderToTexture : api/Sandbox.CameraComponent/RenderToTexture
trophy 105
Aug 2024 1 post
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.