Facepunch / garrysmod-requests

Feature requests for Garry's Mod
84 stars 24 forks source link

Increase the number of active point_cameras in a map #2045

Open Battlefieldkille opened 1 year ago

Battlefieldkille commented 1 year ago

Hello, I was working on a map a while ago when I noticed only one active point_camera can exist in a map. Func_monitor is properly displaying one camera but cant do multiple cameras at the same time. Can this be increased? Would there be bad side effects if so?

Thanks.

neico commented 1 year ago

The only drawback would be increased performance load and possible graphics glitches depending on the positioning, but other things like water, fog and func_reflective_glass can impact that as well.

The code merely needs to prepare more _rt_camera render target textures, which technically is already possible via GetRenderTargetEx and render.CopyRenderTargetToTexture. But I'm unsure if point_camera and func_monitor texture's natively support assigning texture/materials via lua

Noctara commented 1 year ago

Dystopia mod has 5 _rt_camera textures, and all of the can persist on screen at once and have uniques cameras.

Having 10 _rt_camera textures in gmod will be good...

By the way, did you know you can have multiple active cameras+monitor in any source game? Just make sure that only one monitor persist on screen at same time. If more that one active monitor on screen the closest will render correctly.