garrysmod-issues
garrysmod-issues copied to clipboard
Rendertargets get cut off when drawn to HUD and game resolution is below RT dimensions
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.
After further testing, it seems this happens not only when RTs are drawn to the HUD.
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.
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.Start2Dto draw to render targets larger than the screen, with an example.
The thing is, Starfall's PushRenderTarget equivalent does do that, yet this still happens.
https://github.com/thegrb93/StarfallEx/blob/184648c3b208eb2f706b4b43899ef6589640f22a/lua/starfall/libs_cl/render.lua#L1182
Provide Lua code to reproduce the issue, if you believe there's still an issue.