Page 1 of 1

Using a Shader breaks Image:replacePixels on my system

Posted: Thu Apr 15, 2021 11:19 am
by grump
I have this weird bug with LÖVE 11.3 where I can't update an Image after a shader was active. Can anyone else confirm this or is it my system?

I have a minimal example. Run the love file and press space key.

Expected behavior: Bars scrolling right to left, pressing the space key does not make it stop.
Actual behavior: Bars scrolling right to left. No more scrolling after pressing space key (replacePixels does nothing from this point on).

This only happens if the shader uses a second image. The default white pixel texture is used here to keep the example minimal, but it doesn't matter what the second image is.

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Thu Apr 15, 2021 11:20 am
by Nikki
I have the same behaviour. the scrolling stops after pressing space

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Thu Apr 15, 2021 11:22 am
by grump
Well that was quick, lol. Thanks.

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Thu Apr 15, 2021 12:19 pm
by slime
This is fixed in 11.4 already (as of a few months ago) - you can try a recent nightly Windows build of it here: https://ci.appveyor.com/project/AlexSzp ... /artifacts

A workaround is possible for 11.3 as well, but I forget the exact details - in fact I think you might have been the person who reported the issue before it got fixed in 11.4...

I wrote this about it before:
you can probably work around it by having multiple textures and doing something to the second one after the newShader call but before the replacePixels
'something' = draw or replacePixels or setFilter or setWrap, maybe

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Thu Apr 15, 2021 12:30 pm
by grump
slime wrote: Thu Apr 15, 2021 12:19 pm A workaround is possible for 11.3 as well, but I forget the exact details - in fact I think you might have been the person who reported the issue before it got fixed in 11.4...
Oh, really? It's possible... I can't remember. I searched the issues on GitHub but nothing came up.

I'm now working around it by drawing something else, like

Code: Select all

love.graphics.line(0, 0, 0, 0)
at the start of the frame.

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Fri Apr 16, 2021 7:59 am
by grump
slime wrote: Thu Apr 15, 2021 12:19 pm This is fixed in 11.4 already (as of a few months ago) - you can try a recent nightly Windows build of it here:
Are there plans for a 11.4 release any time soon? Weird workarounds to make my stuff work are piling up.

You say
This is fixed in 11.4 already (as of a few months ago)
but there is no 11.4 available that a normal person could find and install, probably even less so on platforms that are not Windows.

It takes way too long for bug fixes to be released imo. Bugs get fixed, that's good, but that's useless if the fixes remain unreleased. At least beta builds should be made available from an official place that a user can install without much hassle.

I compiled love myself for a while, but giving people .love files does become unfeasible then because it takes months or years until the bugfixes are officially released.

Sorry for double post, an edit would probably go unnoticed.

Re: Using a Shader breaks Image:replacePixels on my system

Posted: Mon Apr 19, 2021 10:54 am
by grump
crickets

A little bit slow in the release department, but at least there's a lot of good and healthy communication!