I am learning shaders right now and I have a shader doing what I want for the most part (just diffusing a color). I had a single pixel have its color reset to full red with:
Code: Select all
love.graphics.setColor(1,0,0,1)
love.graphics.circle("fill",rx,ry,1)
Nothing special there, or so I thought. I wanted to see how it interacted with a line of color, so I did this when first making the canvas:
Code: Select all
love.graphics.setColor(0,0,1,1)
love.graphics.rectangle("fill",4,0,1,64)
The blue line was always disappearing though. I did a lot of experimenting to find why it was disappearing and what I found is that setColor was acting to multiply the colors the shader returned by what setColor was set to. Or to be more clear, if the shader returned red at 0.5 and I had used setColor to setColor(0.5,0.5,0.5,1), the red would be 0.25.
Is this interaction intended?