render
The render library is a powerful set of functions that let you control how the world and its contents are rendered. It can also be used to draw some 3D clientside effects such as beams, boxes and spheres.
Methods
Adds a Beam Segment to the Beam started by render. StartBeam.
For more detailed information on Beams, as well as usage examples, see the Beams Render Reference
Blurs the render target ( or a given texture )
Calling this on a RenderTarget created with TEXTUREFLAGS_POINTSAMPLE will result in strange visual glitching.
render.BrushMaterialOverride( IMaterial mat = nil )
This function overrides the brush material for next render operations. It can be used with Entity:DrawModel.
Captures a part of the current render target and returns the data as a binary string in the given format.
Since the pixel buffer clears itself every frame, this will return a black screen outside of render hooks. To capture the user's final view, use GM:PostRender. This will not capture the Steam overlay or third-party injections (such as the Discord overlay, Overwolf, and advanced cheats) on the user's screen.
In PNG mode, this function can produce unexpected result where foreground is rendered as transparent.
This is caused by render. SetWriteDepthToDestAlpha set to true when doing most of render operations, including rendering in _rt_fullframefb. If you want to capture render target's content as PNG image only for output quality, set RenderCaptureData structure's alpha to false when capturing render targets with render. SetWriteDepthToDestAlpha set to true. Issue Tracker: 2571This function will return nil if escape menu is open
render.CapturePixels()
This is a rendering function that requires a 2d rendering context.
This means that it will only work in 2d Rendering Hooks.
Dumps the current render target and allows the pixels to be accessed by render. ReadPixel.
Capturing outside a render hook will return 0 0 0 255
render.Clear( number r, number g, number b, number a, boolean clearDepth = false, boolean clearStencil = false )
Clears the current render target and the specified buffers.
This sets the alpha incorrectly for surface draw calls for render targets. Issue Tracker: 2085
render.ClearBuffersObeyStencil( number red, number green, number blue, number alpha, boolean clearDepth )
Tests every pixel of the active Render Target against the current Stencil configuration and sets the Color Channel values and, optionally, the Depth Buffer values for every pixel that passes.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
This function does not clear the Stencil Buffer on its own.
If you would like to clear the Stencil Buffer, you can use render. ClearStencil
render.ClearDepth( boolean clearStencil = true )
Resets the depth buffer.
Clears a render target
It uses render. Clear then render. SetRenderTarget on the modified render target.
render.ClearStencil()
Sets the Stencil Buffer value to 0 for all pixels in the currently active Render Target.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.ClearStencilBufferRectangle( number startX, number startY, number endX, number endY, number stencilBufferValue )
Sets the Stencil Buffer value for every pixel in a given rectangle to a given value.
This is not affected by render. SetStencilWriteMask
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
Calculates the lighting caused by dynamic lights for the specified surface.
Calculates the light color of a certain surface.
Calculates diameter of a 3D sphere on a 2D screen.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.CopyRenderTargetToTexture( ITexture Target )
Copies the currently active Render Target to the specified texture.
This does not copy the Depth buffer, no method for that is known at this moment so a common workaround is to store the source texture somewhere else, perform your drawing operations, save the result somewhere else and reapply the source texture.
Copies the contents of one texture to another. Only works with rendertargets.
This does not copy the Depth buffer, no method for that is known at this moment so a common workaround is to store the source texture somewhere else, perform your drawing operations, save the result somewhere else and reapply the source texture.
Sets the cull mode. The culling mode defines how back faces are culled when rendering geometry.
Set's the depth range of the upcoming render.
render.DrawBeam( Vector startPos, Vector endPos, number width, number textureStart, number textureEnd, Color color = Color( 255, 255, 255 ) )
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
Draws a single-segment Beam made out of a textured, billboarded quad stretching between two points.
For more detailed information, including usage examples, see the Beams Render Reference
render.DrawBox( Vector position, Angle angles, Vector mins, Vector maxs, table color = Color( 255, 255, 255 ) )
Draws a box in 3D space.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawLine( Vector startPos, Vector endPos, table color = Color( 255, 255, 255 ), boolean writeZ = false )
Draws a line in 3D space.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawQuad( Vector vert1, Vector vert2, Vector vert3, Vector vert4, table color = Color( 255, 255, 255 ) )
Draws 2 connected triangles. Expects material to be set by render. SetMaterial.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawQuadEasy( Vector position, Vector normal, number width, number height, table color, number rotation = 0 )
Draws a quad.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawScreenQuad( boolean applyPoster = false )
Draws the current material set by render. SetMaterial to the whole screen. The color cannot be customized.
See also render. DrawScreenQuadEx.
This is a rendering function that requires a 2d rendering context.
This means that it will only work in 2d Rendering Hooks.
Draws the current material set by render. SetMaterial to the area specified. Color cannot be customized.
See also render. DrawScreenQuad.
This is a rendering function that requires a 2d rendering context.
This means that it will only work in 2d Rendering Hooks.
render.DrawSphere( Vector position, number radius, number longitudeSteps, number latitudeSteps, table color = Color( 255, 255, 255 ) )
Draws a sphere in 3D space. The material previously set with render. SetMaterial will be applied the sphere's surface.
See also render. DrawWireframeSphere for a wireframe equivalent.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawSprite( Vector position, number width, number height, table color = Color( 255, 255, 255 ) )
Draws a sprite in 3D space.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawTextureToScreen( ITexture tex )
Draws a texture over the whole screen.
This is a rendering function that requires a 2d rendering context.
This means that it will only work in 2d Rendering Hooks.
Draws a textured rectangle.
This is a rendering function that requires a 2d rendering context.
This means that it will only work in 2d Rendering Hooks.
render.DrawWireframeBox( Vector position, Angle angle, Vector mins, Vector maxs, table color = Color( 255, 255, 255 ), boolean writeZ = false )
Draws a wireframe box in 3D space.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
render.DrawWireframeSphere( Vector position, number radius, number longitudeSteps, number latitudeSteps, table color = Color( 255, 255, 255 ), boolean writeZ = false )
Draws a wireframe sphere in 3d space.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
Sets the status of the clip renderer, returning previous state.
To prevent unintended rendering behavior of other mods/the game, you must reset the clipping state to its previous value.
render.EndBeam()
Ends the beam mesh of a beam started with render. StartBeam.
For more detailed information on Beams, as well as usage examples, see the Beams Render Reference
render.FogMaxDensity( number maxDensity )
Sets the maximum density of the fog.
Vector render.GetAmbientLightColor()
Returns the ambient color of the map.
ITexture render.GetBloomTex0()
This is used internally - although you're able to use it you probably shouldn't.
You can use GetRenderTargetEx if you need to create a Render Target
Returns the Render Target texture that is used internally for the Bloom Post Processing effect.
ITexture render.GetBloomTex1()
This is used internally - although you're able to use it you probably shouldn't.
You probably want to just use a custom render target. See GetRenderTargetEx.
Returns the Render Target texture used internally for the Blur Post Processing effect.
Despite its name, this function is not used for the Bloom effect.
Returns the current color modulation values as normals.
number render.GetDXLevel()
Returns the maximum available directX version.
Returns the current fog color.
Returns the fog start and end distance.
number render.GetFogMode()
Returns the fog mode.
ITexture render.GetFullScreenDepthTexture()
Returns the full screen depth texture.
boolean render.GetHDREnabled()
Returns whether HDR is currently enabled or not. This takes into account hardware support, current map and current client settings.
Gets the light exposure on the specified position.
ITexture render.GetMoBlurTex0()
This is used internally - although you're able to use it you probably shouldn't.
You probably want to just use a custom render target. See GetRenderTargetEx.
Returns the first render target texture that is used internally for Motion Blur and Frame Blend post processing effects.
ITexture render.GetMoBlurTex1()
This is used internally - although you're able to use it you probably shouldn't.
You probably want to just use a custom render target. See GetRenderTargetEx.
Returns the second render target texture that is used internally for Motion Blur and Frame Blend post processing effects.
ITexture render.GetMorphTex0()
This is used internally - although you're able to use it you probably shouldn't.
You probably want to just use a custom render target. See GetRenderTargetEx.
Returns the first render target texture that was used internally for Morph post processing effect
The post processing effect was removed from the base game at some point during development of Garry's Mod 13, but can still be found as a community mod: https://steamcommunity. com/sharedfiles/filedetails/?id=501088470
ITexture render.GetMorphTex1()
This is used internally - although you're able to use it you probably shouldn't.
You probably want to just use a custom render target. See GetRenderTargetEx.
Returns the second render target texture that was used internally for Morph post processing effect.
See render. GetMorphTex0 for more information. .
ITexture render.GetPowerOfTwoTexture()
Returns the Power Of Two Frame Buffer texture.
ITexture render.GetRefractTexture()
We advise against using this. It may be changed or removed in a future update.
Alias of render. GetPowerOfTwoTexture.
Alias of render. GetPowerOfTwoTexture.
ITexture render.GetRenderTarget()
Returns the currently active render target.
Instead of saving the current render target using this function and restoring to it later, it is generally better practice to use render. PushRenderTarget and render. PopRenderTarget.
ITexture render.GetResolvedFullFrameDepth()
Returns the _rt_ResolvedFullFrameDepth texture for SSAO depth. It will only be updated if GM:NeedsDepthPass returns true.
Obtain an ITexture of the screen. You must call render. UpdateScreenEffectTexture in order to update this texture with the currently rendered scene.
This texture is mainly used within GM:RenderScreenspaceEffects
ITexture render.GetSmallTex0()
Returns the first quarter sized frame buffer texture.
ITexture render.GetSmallTex1()
Returns the second quarter sized frame buffer texture.
ITexture render.GetSuperFPTex()
Returns a floating point texture (RGBA16161616F format) the same resolution as the screen.
The gmodscreenspace doesn't behave as expected when drawing a floating-point texture to an integer texture (e. g. the default render target). Use an UnlitGeneric material instead
ITexture render.GetSuperFPTex2()
See render. GetSuperFPTex
Performs a render trace and returns the color of the surface hit, this uses a low res version of the texture.
Vector render.GetToneMappingScaleLinear()
Returns a vector representing linear tone mapping scale.
Returns the current view setup.
render.MaterialOverride( IMaterial material = nil )
Sets the render material override for all next calls of Entity:DrawModel. Also overrides render. MaterialOverrideByIndex.
Similar to render. MaterialOverride, but overrides the materials per index. Similar to Entity:SetSubMaterial
render. MaterialOverride overrides effects of this function.
number render.MaxTextureHeight()
Returns the maximum texture height the renderer can handle.
number render.MaxTextureWidth()
Returns the maximum texture width the renderer can handle.
Creates a new ClientsideModel, renders it at the specified pos/ang, and removes it. Can also be given an existing CSEnt to reuse instead.
This function is only meant to be used in a single render pass kind of scenario, if you need to render a model continuously, use a cached ClientsideModel and provide it as a second argument. Using this with a map model (game. GetWorld():GetModel()) crashes the game. Issue Tracker: 2688
render.ModelMaterialOverride( IMaterial material )
Forces all future draw operations to use a specific IMaterial.
Because this is independent of a specific Entity, it can be used to change materials on static models that are part of maps.
Overrides the write behaviour of all next rendering operations towards the alpha channel of the current render target.
See also render. OverrideBlend.
Doing surface draw calls with alpha set to 0 is a no-op and will never have any effect.
render.OverrideBlend( boolean enabled, number sourceMultiplier, number destinationMultiplier, number blendingFunction )
Overrides the way that the final color and alpha is calculated for each pixel affected by upcoming draw operations.
When a draw operation is performed, the rendering system examines each pixel that is affected by the draw operation and determines its new color by combining (or "Blending") the pixel's current color (Called the "Destination" or "Dst" color) with the new color produced by the draw operation (Called the "Source" or "Src" color. )
This function allows you to control the way that those two colors (The Source and Destination) are combined to produce the final pixel color.
It's important to know that while Colors use values in the range (0-255), the color and alpha values used here are normalized to the range (0-1) so that they can be multiplied together to produce a value that is still in the range (0-1).
render.OverrideBlendFunc( boolean enabled, number srcBlend, number destBlend, number srcBlendAlpha = nil, number destBlendAlpha = nil )
We advise against using this. It may be changed or removed in a future update.
Use render. OverrideBlend instead.
Overrides the internal graphical functions used to determine the final color and alpha of a rendered texture.
See also render. OverrideAlphaWriteEnable.
Doing surface draw calls with alpha set to 0 is a no-op and will never have any effect.
Overrides the write behaviour of all next rendering operations towards the color channel of the current render target.
Overrides the write behaviour of all next rendering operations towards the depth buffer.
render.PerformFullScreenStencilOperation()
Performs a Stencil operation on every pixel in the active Render Target without performing a draw operation.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.PopCustomClipPlane()
Removes the current active clipping plane from the clip plane stack.
render.PopFilterMag()
Pops (Removes) the texture filter most recently pushed (Added) onto the magnification texture filter stack.
This function should only be called after a magnification filter has been pushed via render. PushFilterMag()
For more detailed information and a usage example, see the texture minification and magnification render reference.
render.PopFilterMin()
Pops (Removes) the texture filter most recently pushed (Added) onto the minification texture filter stack.
This function should only be called after a minification filter has been pushed via render. PushFilterMin()
For more detailed information and a usage example, see the texture minification and magnification render reference.
render.PopFlashlightMode()
Pops the current flashlight mode from the flashlight mode stack.
render.PopRenderTarget()
Pops the last render target and viewport from the RT stack and sets them as the current render target and viewport.
This is should be called to restore the previous render target and viewport after a call to render. PushRenderTarget.
Pushes a new clipping plane of the clip plane stack and sets it as active.
A max of 2 clip planes are supported on Linux/POSIX, and 6 on Windows. Issue Tracker: 2687
render.PushFilterMag( number texFilterType )
Pushes (Adds) a texture filter onto the magnification texture filter stack.
This will modify how textures are stretched to sizes larger than their native resolution for upcoming rendering and drawing operations.
For a version of this same function that modifies filtering for texture sizes smaller than their native resolution, see render. PushFilterMin()
Always be sure to call render. PopFilterMag() afterwards to avoid texture filtering problems.
For more detailed information and a usage example, see the texture minification and magnification render reference.
render.PushFilterMin( number texFilterType )
Pushes (Adds) a texture filter onto the minification texture filter stack.
This will modify how textures are compressed to a lower resolution than their native resolution for upcoming rendering and drawing operations.
For a version of this same function that modifies filtering for texture sizes larger than their native resolution, see render. PushFilterMag()
Always be sure to call render. PopFilterMin() afterwards to avoid texture filtering problems.
For more detailed information and a usage example, see the texture minification and magnification render reference.
render.PushFlashlightMode( boolean enable = false )
Enables the flashlight projection for the upcoming rendering.
We advise against using this. It may be changed or removed in a future update.
This will leave models lit under specific conditions. You should use render. RenderFlashlights which is meant as a direct replacement for this function.
render.PushRenderTarget( ITexture texture = nil, number x = 0, number y = 0, number w = texture:Width(), number h = texture:Height() )
Pushes the current render target and viewport to the RT stack then sets a new current render target and viewport. If the viewport is not specified, the dimensions of the render target are used instead.
This is similar to a call to render. SetRenderTarget and render. SetViewPort where the current render target and viewport have been saved beforehand, except the viewport isn't clipped to screen bounds.
See also render. PopRenderTarget.
If you want to render to the render target in 2d mode and it is not the same size as the screen, use cam. Start2D and cam. End2D. If the render target is bigger than the screen, rendering done with the surface library will be clipped to the screen bounds unless you call DisableClipping
Reads the color of the specified pixel from the RenderTarget sent by render. CapturePixels
render.RedownloadAllLightmaps( boolean DoStaticProps = false, boolean UpdateStaticLighting = false )
This applies the changes made to map lighting using engine. LightStyle.
render.RenderFlashlights( function renderFunc )
Renders additive flashlights on an IMesh, a direct replacement for render. PushFlashlightMode.
render.RenderView( table view = nil )
Renders the scene with the specified viewData to the current active render target.
Static props and LODs are rendered improperly due to incorrectly perceived distance. Issue Tracker: 1330
Resets the model lighting to the specified color.
Calls render. SetModelLighting for every direction with given color.
render.ResetToneMappingScale( number scale )
Resets the HDR tone multiplier to the specified value.
This will only work on HDR maps, and the value will automatically fade to what it was ( or whatever render. SetGoalToneMappingScale is ) if called only once.
Sets the ambient lighting for any upcoming render operation.
Sets the alpha blending (or transparency) for upcoming render operations.
See render. SetColorModulation for the function to affect RGB color channels.
By itself, this will cause visible overlapping on parts of a model that are in front of other parts of the same model.
For a solution to this, see the examples below.
This does not affect non-model render. Draw* functions. Issue Tracker: 3166If a material has the $alphatest flag enabled then this function might not behave as expected because alpha will be binary, this has a default cutoff of 0. 7.
render.SetColorMaterial()
Sets the current drawing material to "color".
The material is defined as:
"UnlitGeneric"
{
"$basetexture" "color/white"
"$model" 1
"$translucent" 1
"$vertexalpha" 1
"$vertexcolor" 1
}
render.SetColorMaterialIgnoreZ()
Sets the current drawing material to color_ignorez.
The material is defined as:
"UnlitGeneric"
{
"$basetexture" "color/white"
"$model" 1
"$translucent" 1
"$vertexalpha" 1
"$vertexcolor" 1
"$ignorez" 1
}
Sets the color modulation for upcoming render operations, such as rendering models.
The values can exceed 1 for stronger effect.
See render. SetBlend for the function to affect alpha channel.
If the fog mode is set to MATERIAL_FOG_LINEAR_BELOW_FOG_Z, the fog will only be rendered below the specified height.
render.SetGoalToneMappingScale( number scale )
Sets the goal HDR tone mapping scale.
Use this in a rendering/think hook as it is reset every frame.
render.SetLightingMode( number Mode )
Sets lighting mode when rendering something.
Do not forget to restore the default value to avoid unexpected behavior, like the world and the HUD/UI being affected
render.SetLightingOrigin( Vector lightingOrigin )
Sets lighting origin for the current model.
This does not work for prop_physics. Issue Tracker: 2804
render.SetLightmapTexture( ITexture tex )
Sets the texture to be used as the lightmap in upcoming rendering operations. This is required when rendering meshes using a material with a lightmapped shader such as LightmappedGeneric.
render.SetLocalModelLights( table lights = {} )
Sets up the local lighting for any upcoming render operation. Up to 4 local lights can be defined, with one of three different types (point, directional, spot).
Disables all local lights if called with no arguments.
render.SetMaterial( IMaterial mat )
Sets the material to be used in any upcoming render operation using the render.
Not to be confused with surface. SetMaterial.
Sets up the ambient lighting for any upcoming render operation. Ambient lighting can be seen as a cube enclosing the object to be drawn, each of its faces representing a directional light source that shines towards the object. Thus, there is a total of six different light sources that can be configured separately.
Light color components are not restricted to a specific range (i. e. 0-255), instead, higher values will result in a brighter light.
render.SetRenderTarget( ITexture texture )
Sets the render target to the specified rt.
Sets the render target with the specified index to the specified rt.
Sets a scissoring rect which limits(otherwise known as clipping) the drawing area.
Sets the shadow color.
render.SetShadowDirection( Vector shadowDirections )
Sets the shadow projection direction.
render.SetShadowDistance( number shadowDistance )
Sets the maximum shadow projection range.
render.SetShadowsDisabled( boolean newState )
Sets whether any future render operations will ignore shadow drawing.
render.SetStencilCompareFunction( STENCILCOMPARISONFUNCTION enum compareFunction )
Sets the Compare Function that all pixels affected by a draw operation will have their Stencil Buffer value tested against.
When not set to a static value like NEVER or ALWAYS, the Stencil Buffer value corresponding to each affected pixel will be compared against the current Reference Value.
Pixels that Pass the Compare Function check move on to the Depth Test, which determines if the draw operation will ultimately be allowed to overwrite the pixel's Color Channel, Stencil Buffer, and Depth Buffer values.
Pixels that Fail the Compare Function check have the Fail Operation performed on their Stencil Buffer value and do not have any of their Render Target layers modified by the draw operation.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilEnable( boolean newState )
Enables or disables the Stencil system for future draw operations.
While enabled, all pixels affected by draw operations will have their corresponding values in the active Render Target's Stencil Buffer compared against the current Reference Value and their current Depth Buffer value compared against the depth of the corresponding pixel from the draw operation.
Depending on the outcomes of these comparisons, one of either the Pass, Fail, or Z-Fail operations is performed on the pixel's Stencil Buffer value.
A pixel will only be updated in the active Render Target if the Pass Operation is performed.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
The Stencil system's configuration does not reset automatically.
To prevent unexpected behavior, always manually ensure that the Stencil system is configured appropriately for your use-case after enabling it.
render.SetStencilFailOperation( STENCILOPERATION enum failOperation )
Sets the Stencil Operation that will be performed on the Stencil Buffer values of pixels affected by draw operations if the Compare Function did not Pass the pixel.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilPassOperation( STENCILOPERATION enum passOperation )
Sets the Stencil Operation that will be performed on the Stencil Buffer values of pixels affected by draw operations if the Compare Function Passes the pixel.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilReferenceValue( number referenceValue )
Sets the Stencil system's Reference Value which is compared against each pixel's corresponding Stencil Buffer value in the Compare Function and can be used to modify the Stencil Buffer value of those same pixels in the Pass, Fail, and Z Fail operations.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilTestMask( number bitMask )
Sets the unsigned 8-bit (byte) bitflag mask that will be bitwise ANDed with all values as they are read (tested) from the Stencil Buffer
This can be considered a "niche" Stencil function as it is not required for many Stencil use-cases.
This is a companion function to render. SetStencilWriteMask which modifies Stencil Buffer values as they are written.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilWriteMask( number bitMask )
Sets the unsigned 8-bit (byte) bitflag mask that will be bitwise ANDed with all values as they are written to the Stencil Buffer
This can be considered a "niche" Stencil function as it is not required for many Stencil use-cases.
This is a companion function to render. SetStencilTestMask which modifies Stencil Buffer values as they are read.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetStencilZFailOperation( STENCILOPERATION enum zFailOperation )
Sets the Stencil Operation that will be performed on the Stencil Buffer values of pixels affected by draw operations if the Compare Function Passed a given pixel, but it did not Pass the Depth Test.
For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page
render.SetToneMappingScaleLinear( Vector vec )
Changes the view port position and size. The values will be clamped to the game's screen resolution.
If you are looking to render something to a texture (render target), you should use render. PushRenderTarget.
This function will override values of ScrW and ScrH with the ones you set.
render.SetWriteDepthToDestAlpha( boolean enable )
Sets the internal parameter INT_RENDERPARM_WRITE_DEPTH_TO_DESTALPHA
render.Spin()
Swaps the frame buffers/cycles the frame. In other words, this updates the screen.
If you take a really long time during a single frame render, it is a good idea to use this and let the user know that the game isn't stuck.
This is a rendering function that requires a 3d rendering context.
This means that it will only work in 3d Rendering Hooks.
Begin drawing a multi-segment Beam.
For more detailed information on Beams, as well as usage examples, see the Beams Render Reference
boolean render.SupportsHDR()
Returns whether the player's hardware supports HDR. (High Dynamic Range) HDR can still be disabled by the mat_hdr_level console variable or just not be supported by the map.
boolean render.SupportsPixelShaders_1_4()
Returns if the current settings and the system allow the usage of pixel shaders 1. 4.
boolean render.SupportsPixelShaders_2_0()
Returns if the current settings and the system allow the usage of pixel shaders 2. 0.
boolean render.SupportsVertexShaders_2_0()
Returns if the current settings and the system allow the usage of vertex shaders 2. 0.
render.SuppressEngineLighting( boolean suppressLighting )
Suppresses or enables any engine lighting for any upcoming render operation.
This does not affect IMeshes. Issue Tracker: 4070
render.TurnOnToneMapping()
Enables HDR tone mapping which influences the brightness.
render.UpdateFullScreenDepthTexture()
Updates the texture returned by render. GetFullScreenDepthTexture.
Silently fails if render. SupportsPixelShaders_2_0 returns false.
ITexture render.UpdatePowerOfTwoTexture()
Updates the power of two texture.
render.UpdateRefractTexture()
Pretty much alias of render. UpdatePowerOfTwoTexture but does not return the texture.
render.UpdateScreenEffectTexture( number textureIndex = 0 )
Copies the entire screen to the screen effect texture, which can be acquired via render. GetScreenEffectTexture. This function is mainly intended to be used in GM:RenderScreenspaceEffects
render.WorldMaterialOverride( IMaterial mat = nil )
This function overrides all map materials for one frame.