Someone tell me how to render RTs as textures

I promise if you do I’ll reach deep into the fathoms of my anus and pull out a PortalGun

I think there’s a line in the VMT you put something like $RenderTarget

One minute I’ll look it up

EDIT:

So like eh I set up my RT in settings/render_targets but eh I do dis

local oldRT = render.GetRenderTarget()
render.SetRenderTarget(self.Entity:GetNetworkedBoo l(“blue”) and “_rt_bluPortal” or “_rt_redPortal”)
render.Clear(0,0,0,255)
render.SetViewPort(0,0,camData.w,camData.h)
render.RenderView(camData)
render.SetRenderTarget(oldRT)

and dis

self.sprite:SetMaterialTexture("$basetexture", self.Entity:GetNetworkedBool(“blue”) and “_rt_bluPortal” or “_rt_redPortal”)

And it don’t works no-how.

[lua]entity():SetMaterial(“model/wireframe”)[/lua]

That doesn’t explain much