Facepunch / garrysmod-issues

Garry's Mod issue tracker
136 stars 56 forks source link

Rendertargets get cut off when drawn to HUD and game resolution is below RT dimensions #5880

Closed ZH-Hristov closed 3 hours ago

ZH-Hristov commented 1 month ago

Bit of a crosspost from here:

https://github.com/thegrb93/StarfallEx/issues/1629

There's some example pics and a Starfall code example in there, but the code should be pretty similar for normal GLua.

Starfall RTs are limited to 1024x1024 for memory saving and reusage purposes, since we can't destroy RTs in GLua.

ZH-Hristov commented 1 week ago

After further testing, it seems this happens not only when RTs are drawn to the HUD.

robotboy655 commented 3 hours ago

I couldn't be bothered to adapt your script to work in GMod, but the wiki page for render.PushRenderTarget has a clear indication to use cam.Start2D to draw to render targets larger than the screen, with an example.