Tweaking "Light" effect
This commit is contained in:
parent
fcb392aec3
commit
f8358530ff
3 changed files with 7 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ Copyright (c) 2002-2023
|
|||
Various contributors (see below, and AUTHORS.txt)
|
||||
https://tuxpaint.org/
|
||||
|
||||
2023.May.5 (0.9.30)
|
||||
2023.May.8 (0.9.30)
|
||||
* Improvements to Stamp tool:
|
||||
---------------------------
|
||||
* Avoid playing English descriptive sound for a stamp
|
||||
|
|
@ -98,6 +98,9 @@ https://tuxpaint.org/
|
|||
h/t Pere
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* Light: Better shape to the effect.
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* New Magic Tools:
|
||||
----------------
|
||||
* Rainbow Cycle: Changes colors each time you use it
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 42 KiB |
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: April 20, 2023
|
||||
Last updated: May 8, 2023
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -146,7 +146,8 @@ static void do_light(void *ptr, int which ATTRIBUTE_UNUSED,
|
|||
|
||||
SDL_GetRGB(pix, canvas->format, &r, &g, &b);
|
||||
|
||||
adj = (((float)light_radius - 0.01) - sqrt(abs(xx * yy))) / (16.0 * (float)light_radius);
|
||||
adj = sqrt(light_radius - sqrt((xx * xx) + (yy * yy))) / 64.0;
|
||||
// adj = (((float)light_radius - 0.01) - sqrt(abs(xx * yy))) / (16.0 * (float)light_radius);
|
||||
|
||||
api->rgbtohsv(r, g, b, &h, &s, &v);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue