I've noticed that when the default shader is set up using
Code: Select all
love.graphics.setShader()
However, I'm struggling to create the same behavior with my custom shader. I have no problem creating a shader that works with either ArrayImage or a simple Image, but not with both. By "both," I mean not simultaneously, but with one (random) of them at a time, like in my example:
Code: Select all
-- This works just fine
love.graphics.setShader()
love.graphics.draw(image, 100, 100)
love.graphics.draw(arrayImage, 300, 100)
-- But this gives an error!
-- love.graphics.setShader(shader)
-- love.graphics.draw(image, 100, 100)
-- love.graphics.draw(arrayImage, 300, 100)
Here's the full code attached to illustrate my problem: