Skybox not fully rendered with a render target

Hello! I’m having one last issue with my RT that I really don’t know how to fix. The skybox from this RT renderpoint isn’t being fully rendered. Rather, it’s partially transparent for some reason, resulting in me seeing the red background I draw in render.Clear before rendering the scene. Any idea what could be causing this? The rendertarget is 1024x1024, and the FOV is 5. I’m thinking it could be farclip, not sure.



hook.Add("RenderScene","InsurrectionRTScope", function( tmporigin, tmpviewangles, tmpfov)
	local tmprt = Insurgency_Mat_RT
	if tmprt then
				local oldrt = render.GetRenderTarget( )
				render.SetRenderTarget( tmprt )
				render.SetViewPort( 0, 0, 1024, 1024 )
				render.Clear( 255, 000, 000, 255, true )
				local RTScopeCam = {}
				RTScopeCam.x = 0
				RTScopeCam.y = 0
				RTScopeCam.w = 1024
				RTScopeCam.h = 1024
				RTScopeCam.fov = LocalPlayer():GetActiveWeapon().Scope_FOV
				RTScopeCam.drawhud = false
				RTScopeCam.ortho = false
				RTScopeCam.drawviewmodel = false
				RTScopeCam.dopostprocess = false
				RTScopeCam.angles = tmpviewangles
				RTScopeCam.origin = tmporigin
				render.RenderView(RTScopeCam)
				render.SetViewPort( 0, 0, ScrW( ), ScrH( ) )
				render.SetRenderTarget( oldrt )
	end
end)

Quick update. Tried changing farclip, didn’t work. Everything renders fine besides the skybox. Completely stumped here, as the code all looks correct to me. Viewport code matches with the RT size, works fine for the most part.

To anyone else who has this problem, decrease the RT size to 1000 or less. Consider this solved.