push
push copied to clipboard
Push:finish() Shader Processing After window resize or fullscreen mode
Issue: When you resize the window and apply a table of shaders to push using the push:finish(shaders) the first shader in the table is offset on screen in the incorrect position. Subsequent shaders in the table are processed in the correct position.
Created a scenario where I have a shader create a circle at a predefined pos. I made a table of copies of this one shader object and passed it to push:finish(). First is offset, subseuqent are applied in the same position. Problem goes away if you return screen to original non-resized position.
Problem does not exist if you are not in full screen mode or the window has not be resized.
due to the problem i have to apply all the shaders manually... and use old version of the push lib.
Hello, sorry for the delay. I haven’t looked into this yet, but have you tried updating the screen dimensions inside your shader? Something such as shader:send(‘screen_dimensions’, { push:getWidth(), push:getHeight() })
? I will try replicating the issue, but if you could provide a .love file that would greatly help me.
Have a nice day :-)
Hello, sorry for the delay. I haven’t looked into this yet, but have you tried updating the screen dimensions inside your shader? Something such as
shader:send(‘screen_dimensions’, { push:getWidth(), push:getHeight() })
? I will try replicating the issue, but if you could provide a .love file that would greatly help me.
O changing the game mode, all the loaded into GPU shaders are erased. Most of my shaders do not need any "screen_dimensions" extra variables. E.g. I use shaders for my game characters' palette swap. Thus on each toggle Full Screen / Window modes I reload all the shaders again in my code.
I do not see it as a problem. I think it might be noted in the readme or something. I'm staying with a modded old version of push.