Page 1 of 2

11 version setColor BUG

Posted: Mon Apr 16, 2018 4:42 am
by le171138028
10 version
love.graphics.setColor(400,400,400,255)--Will make the drawing bright

11 version
love.graphics.setColor(2,2,2,1)--Equate to{1,1,1,1} Not bright

The 10 version is very convenient

The 11 version is a helplessness
I want to know how the 11 version is going to be realized and the picture is brighter.

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 5:57 am
by PGUp
255 is the brightest color possible in 0.10, making the color more than that doesnt do anything

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 6:01 am
by le171138028
In the 0.10.2 version,love.graphics.setColor(400,400,400,255) will make the picture brighter.
It can be very simple to achieve picture buttons, focus, press, special effects.
The 11 version lost this feature.
To achieve the same effect, become complex

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 6:10 am
by le171138028
GIF.gif
GIF.gif (85.1 KiB) Viewed 5657 times
In the 0.10.2 version
We only need to dynamically change the color value to achieve the bright and darkening effect.

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 6:39 am
by raidho36
Or you can start with a bright picture and darken it if necessary. Though I agree that color clamping is entirely unnecessary precisely because it's just a multiplier value and users might want to multiply the color by values outside of 0-1 range.

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 7:17 am
by le171138028
Thank you for your reply!
But this is wrong. The 11 version limits the drawing and the brightest.
And in the 10 version, the drawing brightness is infinite.
For example:
Love.graphics.setColor (1000,1000,1000,255) -- whitening the picture.

This is very free.

However, the 11 version limits color to 1,1,1,1.Can't break through, like a cage

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 7:50 am
by zorg
From stackoverflow:
From the manpage:

"Neither floating-point nor signed integer values are clamped to the range [0,1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into a color buffer."
So technically, if it wasn't clamped, one could cheaply do HDR stuff, but question is, is it correct this way? You'd still probably need a shader to fix the final ranges of the values.

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 7:59 am
by le171138028
Thank you for your advice!
But I look at the color device, I don't know much about it.
Can you give an example?
Thanks very much

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 8:12 am
by zorg
No, i'm saying that while OpenGL supports that, i'm sure the löve devs had reason to not allow values outside the 0-1 range from version 11.0 onwards. You could get back that functionality through shaders though.

Re: 11 version setColor BUG

Posted: Mon Apr 16, 2018 8:18 am
by le171138028
Beyond, what would it be?
Now, beyond, it's very convenient