Age | Commit message (Collapse) | Author |
|
|
|
possible, true/false for booleans, format for float litterals).
|
|
Code was different from original here, result was apparent in color
picker wedge position.
|
|
Basically avoid redundant computations. Gives ~1-4% speedup in the compositor depending on the use case.
For more info see: http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv
Reviewers: psy-fi, sergey
Subscribers: campbellbarton
Differential Revision: https://developer.blender.org/D596
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
and value/lightness slider stops midway.
Issue here is manyfold:
Color wheel does not support properties with different soft min/max
values than 1.0 (which after experimenting a little I left as is), and
also color management is completely destroying the mapping between the
value slider and the RNA property value range. To solve this I have
disabled color management by setting the property to gamma corrected
(only in RNA, Sequence editor coders please check!), otherwise it will
just become a big mess of tracking where color comes from and what kind
of color transforms it needs in different color pickers (if property has
non normalized range etc). HSL is not really meant to represent colors
outside a normalized space so I have disabled setting lightness above
1.0 in this model.
This will work, however it is hacking a color picker to do something
other than what it is supposed to do: pick a color from the screen
accurately. Which means normalized values always. The non normalized
colors picked for lift/gain/gamma through the pickers do not correspond
to any accurate colors; they are rather a user friendly way to 'sort of'
choose a color and a gamma with an indication of maximum value.
I think that lift/gamma/gain nodes need a dedicated widget for this
(besides it is quite clear that some options are written for that use
case) -or- a separate gamma multiplier for the picked color (which
should itself be in a normalized space)
|
|
|
|
This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.
The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.
Beware, Old files opened with this preference saved will crash!
Reviewers: sergey, brecht, campbellbarton
Differential Revision: https://developer.blender.org/D385
|
|
|
|
|
|
patch from Sergey
|
|
that cannot convert float to char without false warnings that are turned
into errors with strict flags. I expect that any real conversion
warnings can be caught on linux.
|
|
|
|
|
|
Patch #35359 by Forest Ka.
|
|
previous fix for 2D image painting were done, and also:
* For brushes that do masking (keeping the max contribution to a pixel limited),
the alpha from textures is now part of the mask. In many cases the logic
worked out the same and where it didn't it used to cause artifacts.
* Color interpolation for smear and soften tools now happens in premultipied
space, to avoid bleeding of RGB colors from zero alpha areas.
* Fix a few cases where byte <=> float conversion was not doing the proper
straight <=> premul conversion.
* Replace some float division by constants with multiplications, is faster.
Note: float texture painting seems to have some issues updating the OpenGL
texture, but issue was already there before this commit.
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
|
|
C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if's
|
|
|
|
|
|
many, also don't check uchar range after casting to int, this can still cause
overflow with large float values.
|
|
also add rgba_float_to_uchar, rgba_uchar_to_float
|
|
rgb_uchar_to_float and swap args (math functions mostly have dest arg first like strcpy).
|
|
use rgb_to_grayscale in more places.
|
|
brushes were doing curve lookups within this macro for example.
|
|
* Accelerated sRGB <=> linear conversion using lookup table, this can speed up
loading of images in the compositor and simple renders quite a bit.
* Dithering now uses the Floyd-Steinberg algorithm. Previously it would simply
randomize each pixel slightly, adding noise, now that should be reduced.
Patch #29309 by David M.
|
|
byte => float, float => float, byte => byte conversions with profile, dither
and predivide. Previously code for this was spread out too much.
There should be no functional changes, this is so the predivide/table/dither
patches can work correctly.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
convert to grayscale when saving renders rather then only writing the red channel.
|
|
always pass rv3d argument now.
also found a bug where hex_to_rgb could use un-initialized memory.
|
|
|
|
adjust to use floats.
|
|
|
|
|
|
|
|
|
|
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
|
|
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
|
|
|
|
|