Garry's Mod Wiki

Garry's Mod Wiki

  render.CopyRenderTargetToTexture( ITexture Target )

Description

Copies the currently active Render Target to the specified texture.

This does not copy the Depth buffer, no method for that is known at this moment so a common workaround is to store the source texture somewhere else, perform your drawing operations, save the result somewhere else and reapply the source texture.

Arguments

1 ITexture Target
The texture to copy to

Example

This is how it's used in render.CopyTexture

function render.CopyTexture( from, to ) local OldRT = render.GetRenderTarget() render.SetRenderTarget( from ) render.CopyRenderTargetToTexture( to ) render.SetRenderTarget( OldRT ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...