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:
[code]local from = GetRenderTarget("GModToolgunScreen", 256, 256)
local to = Material("ash47/mytexture"):GetMaterialTexture("$basetexture")
render.CopyTexture(from, to)[/code]
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?
If you want to replace a texture, set the $basetexture material property.
[QUOTE=Map in a box;36138075]If you want to replace a texture, set the $basetexture material property.[/QUOTE]How? To be 100% clear, I want to copy the current renderer texture and replace any other texture I choose with it, I thought that's what render.CopyTexture did...
Sorry, you need to Log In to post a reply to this thread.