Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
center RT camera UV coords
  • Loading branch information
kerbalcadet committed Jan 26, 2026
commit 1c53060d110ea570ea9ff73aee94864b8740c89d
6 changes: 4 additions & 2 deletions lua/entities/gmod_wire_rt_screen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,15 @@ if CLIENT then
local y1 = -yraw
local y2 = yraw

local u1, v1 = 0, 0
local u2, v2 = self:GetScaleX(), monitor.RatioX * self:GetScaleY()
local y_center_offset = self:GetScaleY() * (1 - monitor.RatioX) / 2
local u1, v1 = 0, y_center_offset
local u2, v2 = self:GetScaleX(), v1 + monitor.RatioX * self:GetScaleY()
local scrU = self:GetScrollX()
local scrV = self:GetScrollY()
u1 = u1 + scrU u2 = u2 + scrU
v1 = v1 + scrV v2 = v2 + scrV


cam.Start3D2D(
self:LocalToWorld(monitor.offset),
self:LocalToWorldAngles(monitor.rot),
Expand Down