What is the function of “render.CopyTexture(from, to)”?
I’ve tried playing around with it, to copy a renderer to a texture, but failed:
local from = GetRenderTarget("GModToolgunScreen", 256, 256) local to = Material("ash47/mytexture"):GetMaterialTexture("$basetexture") render.CopyTexture(from, to)
Obviously I’m doing something wrong, feel free to tell me what I’m missing…
I’m simply running this code as is, using lua_openscript_cl, perhaps it needs to be in a hook somewhere?