Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode #519
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix some problems with the Saturation and Value part of the Shading Tool (NOT the Hue problems).
Left grey theme is previous build, right side is new one.
Problem 1: If you darkening value is more than the value of the color, it can end up brightening instead (I think Godot's Color class might wrap around values when setting them)
(Checked the color with the color picker to make sure it was right hue and at the value limit of 10)
Problem 2: If you darken not quite enough for that, but still too much, it will hit the value limit and ignore the darkening. Now it will just be set to the Value limit:
Problem 3: When lightening too much using Saturation, the hue could get messed up, I'm not entirely sure why this happened, but applying the same fix I did to the value part seemed it:
Problem 4: If you brightened the Saturation too much, it would also through out the Hue and Value brightening, so I erased that part. Its not really obvious between the old and new version, so for these screenshots I added it back:
Before: (No value change as it increased the saturation all the way)
After: Both Saturation goes down and Value go up, making it White.
Not sure if it should need more HSV brightening/darkening limits, but it should feel much better to use now.