An idea, a fix and some comments
Closed this issue · 7 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.