Guest User

Untitled

a guest
Feb 9th, 2017
268
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PropertyRTTextures[Key] = GetRenderTargetEx("propertyrt_" .. Key .. SysTime(), 2048, 2048,
  2. RT_SIZE_DEFAULT, MATERIAL_RT_DEPTH_SEPARATE, bit.bor(4, 8), CREATERENDERTARGETFLAGS_UNFILTERABLE_OK, IMAGE_FORMAT_RGB888)
  3. PropertyRTMaterials[Key] = CreateMaterial("propertyrt_" .. Key .. SysTime(), "UnlitGeneric", {
  4.     ["$ignorez"] = 1,
  5.     ["$vertexcolor"] = 1,
  6.     ["$vertexalpha"] = 1,
  7.     ["$nolod"] = 0,
  8.     ["$basetexture"] = PropertyRTTextures[Key]:GetName()
  9. })
  10. local OldRT = render.GetRenderTarget()
  11. render.SetRenderTarget(PropertyRTTextures[Key])
  12.     inhook = true
  13.         render.ClearDepth()
  14.         render.Clear(0, 0, 0, 255)
  15.         local PlrDraws = {}
  16.         for _, v in pairs(player.GetAll()) do
  17.             if not v:GetNoDraw() then
  18.                 PlrDraws[#PlrDraws + 1] = v
  19.                 v:SetNoDraw(true)
  20.             end
  21.         end
  22.         render.RenderView({
  23.             origin = Origin,
  24.             angles = Angles,
  25.             x = 0,
  26.             y = 0,
  27.             w = ScrW(),
  28.             h = ScrH(),
  29.             aspectratio = 2
  30.         })
  31.         for _, v in pairs(PlrDraws) do
  32.             v:SetNoDraw(false)
  33.         end
  34.     inhook = false
  35. render.SetRenderTarget(OldRT)
RAW Paste Data