wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
556 stars 334 forks source link

EGP draws only in top left quadrant #2930

Open Denneisk opened 11 months ago

Denneisk commented 11 months ago

This issue is created to track this bug that I cannot replicate and don't understand the cause of. I'm hoping someone else can help me with this.

Description EGP screens draw in the top left quadrant, half the of the size of the screen. They seem to work normally besides that.

To Reproduce ?

Screenshots 1182454340758294588 1180175032287236136

thegrb93 commented 11 months ago

Next time you see it happen, see if you can find the render target in mat_texture_list and see if its rendering like that in the rendertarget.

It might be that the render target's resolution is 2x what the EGP needs. I think I remember someone changing how rendertargets are created and stored while ago.

Denneisk commented 11 months ago

Next time you see it happen, see if you can find the render target in mat_texture_list and see if its rendering like that in the rendertarget.

It might be that the render target's resolution is 2x what the EGP needs. I think I remember someone changing how rendertargets are created and stored while ago.

Well, issue is that I haven't actually experienced it myself, but a notable amount of users have reported it now. I remember that change with the RTs but I thought it didn't make sense for this to happen from that.

Denneisk commented 11 months ago

Wonder if somewhere in the client it's trying to reset the screen to 512 resolution.

Denneisk commented 9 months ago

Managed to visually reproduce it by setting the last arguments of this line to 0. https://github.com/wiremod/wire/blob/master/lua/entities/gmod_wire_egp/cl_init.lua#L46 Not sure why the UV would reset. Is it possible the upvalues could get GC'd? Some sort of memory conflict? Noticed in the second pic that it doesn't draw twice, it's just failing to clear the previous screen. GPU changing after initialization?