Garry's Mod Wiki

ViewData

Description

Table structure used for render.RenderView.

Unless stated otherwise, the default values for all these keys would be inherited from the engine's CViewSetup and do not have static representations.

Parameters

origin [Vector]

The view's original position

angles [Angle]

The view's angles

aspectratio [number]

Default width divided by height

x [number]

The x position of the viewport to render in

y [number]

The y position of the viewport to render in

w [number]

The width of the viewport to render in

h [number]

The height of the viewport to render in

drawhud [boolean]

Draw the HUD and call the hud painting related hooks

Default: false

drawmonitors [boolean]

Draw monitors

Default: false

drawviewmodel [boolean]

The weapon's viewmodel

Default: true

viewmodelfov [number]

The viewmodel's FOV

fov [number]

The main view's FOV

ortho [boolean]

Render the view orthogonal. Can also be a table with these keys: (In which case orthogonal view is automatically set to true)

  • left
  • right
  • top
  • bottom

Default: false

ortholeft [number]

Coordinate for the left clipping plane

orthoright [number]

Coordinate for the right clipping plane

orthotop [number]

Coordinate for the top clipping plane

orthobottom [number]

Coordinate for the bottom clipping plane

znear [number]

The distance of the view's origin to the near clipping plane

zfar [number]

The distance of the view's origin to the far clipping plane

znearviewmodel [number]

The distance of the view's origin to the near clipping plane for the viewmodel

zfarviewmodel [number]

The distance of the view's origin to the far clipping plane for the viewmodel

dopostprocess [boolean]

Currently works identically to the "bloomtone" option (it also overrides it if you set this to false).

Default: false

bloomtone [boolean]

Disables default engine bloom and pauses the "brightness changes" on HDR maps.

Default: true

offcenter [table]

This allows you to "zoom in" on a part of the screen - for example, the top-left quarter of the screen. This is similar to how poster splits the screen into separate renders.

It's a table with 4 keys, controlling what portion of the screen to draw:

  • left - where the left edge starts. Natural value is 0.
  • right - where the right edge ends. Natural value is equal to w (the width of the viewport).
  • top - where the bottom edge starts. Natural value is 0.
  • bottom - where the top edge ends. Natural value is equal to h (the height of the viewport).

Note that top and bottom are reversed.

Values outside the viewport are allowed, but not recommended - instead you should increase the view FOV.

Page Links


Special Pages


Wikis

?

Render Time: 55ms

DB GetPage 5
Generate Html 27
SaveChanges (1) 8
Render Body 0
Render Sidebar 13