Garry's Mod Wiki

surface.DrawTexturedRectRawUV

  surface.DrawTexturedRectRawUV( number x, number y, number width, number height, number startU, number startV, number endU, number endV )

Recently Added

This was recently added in version (2026.10.26). It might only be available on the Dev Branch right now.

Description

Draws a textured rectangle with a repeated or partial texture.

This is identical to surface.DrawTexturedRectUV, but does not suffer from internal UV adjustments made by the engine. It is a separate function to prevent issues with existing content that manually adjusts for the internal UV adjustments.

For all intents and purposes, this function should be used over its predecessor.

This is a rendering function that requires a 2d rendering context.

This means that it will only work in 2d Rendering Hooks.

Arguments

1 number x
The X integer coordinate.
2 number y
The Y integer coordinate.
3 number width
The integer width of the rectangle.
4 number height
The integer height of the rectangle.
5 number startU
The U texture mapping of the rectangle origin.
6 number startV
The V texture mapping of the rectangle origin.
7 number endU
The U texture mapping of the rectangle end.
8 number endV
The V texture mapping of the rectangle end.