Using a Shader breaks Image:replacePixels on my system

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
grump
Party member
Posts: 726
Joined: Sat Jul 22, 2017 7:43 pm

Using a Shader breaks Image:replacePixels on my system

Post 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.
Attachments
bug.love
(495 Bytes) Downloaded 58 times
User avatar
Nikki
Prole
Posts: 38
Joined: Wed Jan 25, 2017 5:42 pm

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

Post by Nikki »

I have the same behaviour. the scrolling stops after pressing space
grump
Party member
Posts: 726
Joined: Sat Jul 22, 2017 7:43 pm

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

Post by grump »

Well that was quick, lol. Thanks.
User avatar
slime
Solid Snayke
Posts: 2934
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post 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
grump
Party member
Posts: 726
Joined: Sat Jul 22, 2017 7:43 pm

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

Post 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.
grump
Party member
Posts: 726
Joined: Sat Jul 22, 2017 7:43 pm

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

Post 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.
grump
Party member
Posts: 726
Joined: Sat Jul 22, 2017 7:43 pm

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

Post by grump »

crickets

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

Who is online

Users browsing this forum: Bing [Bot] and 23 guests