Rendering an orthogonal view?

[lua]function GM:RenderScene()
render.Clear(0, 0, 0, 255)

local pos, ang = LocalPlayer():GetPos() + Vector(0,0,500), Angle(90,0,0)

cam.StartOrthoView(0, 0, 512, 512)

	origin = pos,
	angles = ang,
	x = 0, y = 0,
	w = ScrW(), h = ScrH()


return true


That’s the code I have right now, and it’s not working, it still renders everything in a good old boring perspective view. I’m pretty much sure that’s because RenderView overrides the camera, since you have to input the position and angle of the rendering camera, so would there be any way to get it to render an orthogonal view?

There is no way to render the world in an orthogonal view unless garry allows RenderView to accept view and projection matrices.

Now that would be cool. Anyway, thanks for the quick reply, now I guess I’ll have to ask him politely if he can implement that. :v:

Of course, if he allows it to accept matrices, he also has to allow us to build said matrices. He already added a primitive set of matrix functions, he just has to extend them some.

Oh, as far as I know, that shouldn’t be hard. :v:
Or can’t he just make it so it uses the current matrices set using the cam functions, if no argument is given?

You could do it the shitty way and change the FOV to 1.


Wait, render.RenderView doesn’t have a FOV argument right?

Then the camera would have to be placed infinitely high to compensate it.

You could just machine-code the height/angle matrices… Ahem.

I’m just trying to stay hidden amongst the coders, trying not to reveal my ignorance. Anyway, I hope you guys figure this out, I would love to see some orthogonal gamemodes.

Holy shit, is this using your 1 FOV method, or what?

Actually, it’s 15 FOV and roughly 4000 units away from the player.

Niiice. Now what do you call the gamemode? D&DRP? RPGRP? Harbors and Headcrabs?