Rendering a portal style window

Hi, I was wondering how I would render a quad or something that could be looked through like a portal, a render target with depth. All I need is a means to do so. Thanks.

Lua scripters haven’t been able to pull it off as far as I know, so you’re on your own for now.

It’s being worked on. As far as I know, there is no released version that works.

It’s pretty easy to do. What are you trying to make?

I am trying to make a magic mirror type of thing. My idea was to use 2 quads and a stencil buffer and have one of them me setview or renderview but I cannot really fathom it. I sort of mean like looking through a mirror but being able to see into the sides like looking through the doorway in your fantastic magic box.

Ah Magic Box. I’ve been intrigued on how that actually works…

Me too, hence the attempt at replicating this element of it. I am most intruiged as to where it actualy transports you to as I am fairly sure that it is not just hidden behind the box.

I have another problem now, when using renderview I render everything but the world. Is this because it is being used inside a stencil buffer and is there a way to fix it? Thanks.

Are you returning true in the hook?


It finds a empty place in the sky.

Sorry, what do you mean, am I returning true in the hook?

function RenderScene()
return true

Are you doing that?

I am not, will that help?


Also, where do i put it, as all of my stencil buffers etc are in the ENT:Draw() hook.