GMod-Seamless-Portals
GMod-Seamless-Portals copied to clipboard
An idea, a fix and some 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.
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.
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"
Seems like the portals breaking during full game updates was fixed in the dev branch so hopefully the issue will resolve itself
Also there is already portal PVS, but I do like the PreDrawViewModel idea, that might be implemented
Nice
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.
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.