R useScissor (cvar)

Description

This CVar sets an optimisation to scissor clip parts of polygons not visible through visportals, preventing the fragment shader from being run on non-visible geometry. It also enables light scissors, which limit each light’s calculation to the area of screen space corresponding to its volume.

Usage

At the console type…

r_useScissor [bool]

Parameters

  • [bool]
    • 0 - Disable.
    • 1 - Enable.

Flags

Flag Enabled Description
CVAR_ALL all flags
CVAR_BOOL X variable is a boolean
CVAR_INTEGER variable is an integer
CVAR_FLOAT variable is a float
CVAR_SYSTEM system variable
CVAR_RENDERER X renderer variable
CVAR_SOUND sound variable
CVAR_GUI gui variable
CVAR_GAME game variable
CVAR_TOOL tool variable
CVAR_USERINFO sent to servers, available to menu
CVAR_SERVERINFO sent from servers, available to menu
CVAR_NETWORKSYNC cvar is synced from the server to clients
CVAR_STATIC X statically declared, not user created
CVAR_CHEAT X variable is considered a cheat
CVAR_NOCHEAT variable is not considered a cheat
CVAR_INIT can only be set from the command-line
CVAR_ROM display only, cannot be set by user at all
CVAR_ARCHIVE set to cause it to be saved to a config file
CVAR_MODIFIED X set when the variable is modified

Notes

This CVar should always be enabled to reduce the number of polygons processed by the graphics card when they are not visible through visportals. This optimisation does not function when in windowed mode. Despite this optimisation those polygons are still batched by the CPU and sent to the GPU, just not drawn; it is therefor recommended turning it off when testing polycounts with the r_showTris CVar.

This CVar also makes a big difference to light count - if r_usescissor is disabled, the lightcount for a whole polygon will be equal to the number of lights that touch that polygon at any point. If r_usescissor is enabled, the lightcount will increase only within the portion of the polygon that is contained within the light’s own scissor rectangle (approximately equal to the light volume projected into screen space).

Note that the r_usescissor cvar is automatically set to 0 when the screenshot command is given, and is reset to 1 (whether or not it was 1 initially) immediately after the screenshot is written to disk. This has two effects: the view with scissors enabled cannot be captured, and the cvar will become activated after a screenshot.