11 version setColor BUG

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.
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

11 version setColor BUG

Post 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.
PGUp
Party member
Posts: 105
Joined: Fri Apr 21, 2017 9:17 am

Re: 11 version setColor BUG

Post by PGUp »

255 is the brightest color possible in 0.10, making the color more than that doesnt do anything
-
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

Re: 11 version setColor BUG

Post 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
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

Re: 11 version setColor BUG

Post by le171138028 »

GIF.gif
GIF.gif (85.1 KiB) Viewed 5304 times
In the 0.10.2 version
We only need to dynamically change the color value to achieve the bright and darkening effect.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: 11 version setColor BUG

Post 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.
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

Re: 11 version setColor BUG

Post 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
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: 11 version setColor BUG

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

Re: 11 version setColor BUG

Post 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
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: 11 version setColor BUG

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
le171138028
Prole
Posts: 15
Joined: Fri Dec 22, 2017 10:55 am

Re: 11 version setColor BUG

Post by le171138028 »

Beyond, what would it be?
Now, beyond, it's very convenient
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests