GMod-Seamless-Portals icon indicating copy to clipboard operation
GMod-Seamless-Portals copied to clipboard

An idea, a fix and some comments

Open Xalalau opened this issue 1 year ago • 6 comments

Render props through far away portals

hook.Add("SetupPlayerVisibility", "portal_render_distant_props", function(ply, viewEntity)
    if not SeamlessPortals or SeamlessPortals .portalIndex < 1 then return end

    for k, portal in ipairs(ents.FindByClass("seamless_portal")) do
	AddOriginToPVS(portal:GetPos())
    end
end)

Fix lights in the mirror dimension

Change

hook.Add("PostDrawTranslucentRenderables ", "portal_flip_scene", function(_, sky, sky3d)

to

hook.Add("PreDrawViewModels", "portal_flip_scene", function(_, sky, sky3d)

I'm not sure if this is going to break something but it seems to be ok so far.

Xalalau avatar Sep 23 '23 07:09 Xalalau

These changes were tested on my older copy of the addon. I also noticed the current workshop version lags a lot compared to the rendering I'm still using.

Xalalau avatar Sep 23 '23 07:09 Xalalau

Oh and I also discoverd that if we set sv_cheats to 1 and enable "Minecraftfy" on singleplayer, the portals break.

This is the reason: https://wiki.facepunch.com/gmod/ENTITY:OnRemove Under "Clientside behaviour remarks"

Xalalau avatar Sep 23 '23 07:09 Xalalau

Seems like the portals breaking during full game updates was fixed in the dev branch so hopefully the issue will resolve itself

meetric1 avatar Sep 23 '23 13:09 meetric1

Also there is already portal PVS, but I do like the PreDrawViewModel idea, that might be implemented

meetric1 avatar Sep 23 '23 13:09 meetric1

Nice

Xalalau avatar Sep 23 '23 15:09 Xalalau

Also there is already portal PVS, but I do like the PreDrawViewModel idea, that might be implemented

I changed it to PreDrawViewModels. PreDrawViewModel was messing with my weapons.

Xalalau avatar Sep 24 '23 23:09 Xalalau

sorry for the extremely late reply.. this was just fixed in https://github.com/meetric1/GMod-Seamless-Portals/commit/46faa0f5d3040c7d2b17cef30ade70162a325395

rendering performance should be doubled in mirror world as well.

meetric1 avatar May 02 '24 23:05 meetric1