Page 1 of 1
newShader is slow
Posted: Sat Apr 29, 2017 4:27 am
by Ghust1995
I have a call to love.graphics.newShader that is taking 10s plus to finish in some cellphones. It is pretty similar to this one
https://github.com/vrld/shine/blob/mast ... anblur.lua
I thought it might be a load issue and tried loading my shaders async, but love.graphics is not supported in separate threads.
Any suggestions?
Re: newShader is slow
Posted: Tue May 02, 2017 11:17 am
by Karai17
Can you show us your shader? It shouldn't be taking 10s. We use newShader all the time and it takes no discernible amount of time.
Re: newShader is slow
Posted: Tue May 02, 2017 1:01 pm
by raidho36
I think I remember someone had similar issues, the culprit was their GPU driver. Try updating your software.
Re: newShader is slow
Posted: Tue May 02, 2017 7:58 pm
by s-ol
The only other thing I can imagine is a malformed shader, since you are creating it programatically. Did you try printing out the code? maybe it's huuuuge and slows down the GPU, but I think code size limits should shut that down before a 10s parsing delay.
Re: newShader is slow
Posted: Tue May 02, 2017 9:11 pm
by Ghust1995
I did try printing ouy the code, and making it too big was another part of the problem, together with some string concatenation.
Aparently the time was not spent loading the shader but the shader was actually not working and making the screen never leave loading, and when simplified it was just the regular load time (which is strangely high in some cellphones 2s+ in before the first love.load time)