How do I invert/flip the player's screen?

Basically, I want to turn this:

Into this:

Nevermind the hud, but you get what I mean.
Please help.

do you want to flip the map 2?

Are you trying to flip everything, or just the view model?

Probably only the viewmodel.

No, everything.

that’s what I wanted to say

I don’t think there is a way to do so.

Uhm there is a way.

SWEP.ViewModelFlip = true
for the viewmodel

Uhh, care to show?

I remember someone made a script like that two (three?) years ago by just rendering the scene again, but just flipped, and then using the CreateMove and InputMouseApply hooks to also invert the input.
So yeah, it’s very possible.
(I think it was BlackOps or Overv in one of the early waywo’s)

Yeah that was me, but I don’t have that video or script anymore.

I just remember overriding the RenderView hook and rendering the screen to a render target. I had a Lua created material that used a transform proxy to invert the x axis and just rendered that material in place of the render view.

Sounds complicated. I was planning on modifying stereoscopy to use mirror method for 3d.

It’s not that complicated. Here’s something for you to work with.

[lua]local renderTarget = GetRenderTarget( “MirrorTexture”, ScrW(), ScrH(), false )

local MirrorMaterial = CreateMaterial(
“MirrorMaterial”,
“GMODScreenspace”,
{
[ ‘$basetexture’ ] = renderTarget,
[ ‘$basetexturetransform’ ] = “center .5 .5 scale -1 1 rotate 0 translate 0 0”, – This flips the texture along the x axis
[ ‘$texturealpha’ ] = “0”,
[ ‘$vertexalpha’ ] = “1”,
}
)

hook.Add( “RenderScene”, “Draw Scene”, function( origin, angles, fov )
– Draw a render.RenderView to the renderTarget

render.SetMaterial( MirrorMaterial )
render.DrawScreenQuad() -- Draw our mirror'd texture
return true -- Stop the drawing of the default scene

end )[/lua]

…Close enough :v:

[editline]2nd July 2013[/editline]

AH HANDS

You are not setting texture somewhere.

Possibly stupid question, why is MirrorMaterial an error?

More than likely the material doesn’t exist.


local MirrorMaterial = CreateMaterial(
	"MirrorMaterial",
	"GMODScreenspace",
	{
			[ '$basetexture' ] = renderTarget,
			[ '$basetexturetransform' ] = "center .5 .5 scale -1 1 rotate 0 translate 0 0", -- This flips the texture along the x axis
			[ '$texturealpha' ] = "0",
			[ '$vertexalpha' ] = "1",
	}
)

Rename MirrorMaterial to something else then try.