First render in a 'poster' issue

I may be going insane.

This is as small as I could make my code to replicate the issue:

[lua]local tex_render = render.GetMoBlurTex0()
local mat_copy = Material(“pp/copy”)

hook.Add(“RenderScene”, “GAAHHHHHH”, function(origin, angles, fov)
render.PushRenderTarget(tex_render)
render.RenderView()
render.PopRenderTarget()

mat_copy:SetTexture("$basetexture", tex_render)
render.SetMaterial(mat_copy)
render.DrawScreenQuad()

return true

end)[/lua]

(convenient reproduction code)

This code works. If you want, you can replace render.RenderView() with render.Clear(255, 0, 0, 255) and see that the screen is red (pictured below). But while the hook is hooked, run ‘poster 2’ and the first render operation - the top-left corner - preserves the last frame. As if the render.DrawScreenQuad line doesn’t run.

https://i.gyazo.com/daa230cd73d27cb4a554e72e3a25485b.png[/t] (full size)
[t]https://i.gyazo.com/c2362587a006fb376c18a9382aac8c90.png
(full size)

I am out of my wits.

The craziest thing is that I swear this exact same code worked for me last week. And there wasn’t even an update since then.

Does anyone have any idea how to force this to work?

[editline]20th April 2016[/editline]

This is insane.

[lua]local tex_render = render.GetMoBlurTex0()
local mat_copy = Material(“pp/copy”)

hook.Add(“RenderScene”, “GAAHHHHHH”, function(origin, angles, fov)
render.PushRenderTarget(tex_render)
render.RenderView()
render.PopRenderTarget()

mat_copy:SetTexture("$basetexture", tex_render)
render.SetMaterial(mat_copy)
render.DrawScreenQuad()
render.DrawScreenQuad() -- ADDING THIS LINE FIXES THE PROBLEM

return true

end)[/lua]

is this a bug…?