meetric1/GMod-Seamless-Portals

doesn't work with pp_stereoscopy 1

Closed this issue · 10 comments

(maybe you already know this and or it's not a priority)

the RenderScene hook isn't called for some reason when this is enabled

right, so the problem is that stereoscopy overrides the hook

https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/postprocess/stereoscopy.lua#L49

I wonder then if you could use some other hook, but RenderScene sounds like it makes sense here.

For whatever reason, the two render.RenderView calls that the stereoscopy effect uses do not call their own RenderScene, which they definitely should in my experience. Could the RenderScene calls potentially be moved to PostRender?

Looking at it, the only place that RenderScene is used here is when the portals are being drawn. Realistically they should be in DrawMonitors anyways, so I will move it there and let you know how it goes.

EDIT: oh dear

i could try the drawmonitors and see if it looks the exact same

I wanted to reply when I found something servicable but it was just issue after issue. First of all, DrawMonitors is apparently broken according to the wiki and second of all, any other hook didn't work. Especially since it introduced some fun infinite recursion issues, which I could not solve satisfyingly.

yeah, sounds about right

what did the safespace and tardis addon do? I dont think they have this issue, and on their github they use renderview so I don’t know what they did differently

Like I said, RenderView should definitely be calling RenderScene, but for whatever reason, the ones used in the stereoscopy effect do not. If they did then they would cause an infinite loop, but I have no idea where this behavior is being turned off. I can't seem to track down the source code for the Doors addon otherwise I'd definitely peek.

eh, it doesnt matter either way.. nobody uses it anyway

maybe vrmod uses it but what ive seen vrmod renders the scene like 3 times with renderview

we could also detour the hook… but I don’t like detouring code if I don’t have to

this started working for some reason, I have no idea why, I guess I changed around some code at some point and it magically fixed itself