Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PropertyRTTextures[Key] = GetRenderTargetEx("propertyrt_" .. Key .. SysTime(), 2048, 2048,
- RT_SIZE_DEFAULT, MATERIAL_RT_DEPTH_SEPARATE, bit.bor(4, 8), CREATERENDERTARGETFLAGS_UNFILTERABLE_OK, IMAGE_FORMAT_RGB888)
- PropertyRTMaterials[Key] = CreateMaterial("propertyrt_" .. Key .. SysTime(), "UnlitGeneric", {
- ["$ignorez"] = 1,
- ["$vertexcolor"] = 1,
- ["$vertexalpha"] = 1,
- ["$nolod"] = 0,
- ["$basetexture"] = PropertyRTTextures[Key]:GetName()
- })
- local OldRT = render.GetRenderTarget()
- render.SetRenderTarget(PropertyRTTextures[Key])
- inhook = true
- render.ClearDepth()
- render.Clear(0, 0, 0, 255)
- local PlrDraws = {}
- for _, v in pairs(player.GetAll()) do
- if not v:GetNoDraw() then
- PlrDraws[#PlrDraws + 1] = v
- v:SetNoDraw(true)
- end
- end
- render.RenderView({
- origin = Origin,
- angles = Angles,
- x = 0,
- y = 0,
- w = ScrW(),
- h = ScrH(),
- aspectratio = 2
- })
- for _, v in pairs(PlrDraws) do
- v:SetNoDraw(false)
- end
- inhook = false
- render.SetRenderTarget(OldRT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement