Age | Commit message (Collapse) | Author |
|
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
|
|
This patch adds wavelength node support to Eevee, similar to how
Eevee Blackbody node works, thus it is a little off from Cycles.
Reviewed By: #eevee_viewport, fclem, brecht
Differential Revision: https://developer.blender.org/D11326
|
|
In some cases functions were defined with arguments of different array
lengths in headers vs. implementations. This commit fixes some of the
cases I ran into, but probably not all of them.
|
|
Comment blocks not conforming to convention.
|
|
No functional changes
|
|
- Direct assignment caused ID user counts to be invalid.
- The first palette would always be used,
even when the named palette searched for was found.
Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
|
|
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
|
|
This commit does two things:
- Adds an option to do the calculation in different color spaces (BT601
or BT709).
- Changes the default caluclation from legacy BT601 to BT709.
This affects several areas:
- UI areas (mainly scopes)
- ViewLevelsNode
- Several other nodes that use `COM_ConvertOperation.h`
|
|
|
|
This change is for a few reasons:
- it works with color, and (therefore) will need to be color managed, at
some point. This will be much easier to do if the code is closer to the
actual color management code (in Blender's core, so to speak).
- it has nothing to do with the actual fire simulation, as it is just
used to create a lookup table
- it can be reused for other purposes (i.e. in Blender internal
renderer, if people are interrested in a blackbody node à la Cycles)
- cleanup: some functions (`contrain_rgb`, `xyz_to_rgb`) already exist
in BLI
Reviewers: brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D1719
|
|
|
|
calculations and use the OCIO one instead.
|
|
Differential Revision: https://developer.blender.org/D1095
|
|
projection painting (2D will be separate commit).
|
|
|
|
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
|
|
|
|
|
|
old issue, the formulas here were never quite right, should all work ok now
with byte and float images.
Some differences:
* Colors with zero alpha from the background will never have an influence, so
you don't get alpha fringes when painting over such areas. This does give
hard edges when looking at the RGB channels alone, but there's no way to
avoid that and fringes at the same time, same behavior as other painting apps.
* Add/Subtract/Multiply/Lighten/Darken now leave the alpha channel unchanged
and work only the RGB channels, again same behavior as many other apps.
* Erase/Add alpha now compensates for premultiplied float images to keep the
straight RGB colors the same.
Next: fix projection painting.
|
|
|
|
Additional changes:
- Made mipmapping operate with unsigned short instead of char
which allowed to eliminate extra division by 255, so prevision
should be a bit better now.
- Actually, this is not real unsigned short range, but it's a
range of 255*255 which is more convenient for mipmapping, so
made conversion functions private for scaling.c
Not sure it worth making this functions operate in 65535
range, for now current behavior seems to be just fine.
|
|
Regression was caused by alpha premul cleanup commit and the reason
of slowdown was uchar <-> float conversion which is slow.
Replaced with uchar <-> int conversion which seeps to be accurate
enough and mostly eliminates slowdown.
Slowdown was easy to notice when movie clip is used for 3d vierport
background and undistortion is enabled. In this case every frame
will re-calculate mipmaps.
It's still a nit slower than mipmap generation before cleanup
commit, but couldn't think about extra boost here atm.
|
|
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
assumptions.
- There's an input image setting to say whether it's stored with
straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
deliver straight alpha.
Some implementation details:
- Removed scene's color unpremultiply setting, which was very
much confusing and was wrong for default settings.
Now all renderers assumes to deliver premultiplied alpha.
- IMB_buffer_byte_from_float will now linearize alpha when
converting from buffer.
- Sequencer's effects were changed to assume bytes have got
straight alpha. Most of effects will work with bytes still,
however for glow it was more tricky to avoid data loss, so
there's a commented out glow implementation which converts
byte buffer to floats first, operates on floats and returns
bytes back. It's slower and not sure if it should actually
be used -- who're using glow on alpha anyway?
- Sequencer modifiers should also be working nice with straight
bytes now.
- GLSL preview will predivide float textures to make nice shading,
shading with byte textures worked nice (GLSL was assuming straight
alpha).
- Blender Internal will set alpha=1 to the whole sky. The same
happens in Cycles and there's no way to avoid this -- sky is
neither straight nor premul and doesn't fit color pipeline well.
- Straight alpha mode for render result was also eliminated.
- Conversion to correct alpha need to be done before linearizing
float buffer.
- TIFF will now load and save files with proper alpha mode setting
in file meta data header.
- Remove Use Alpha from texture mapping and replaced with image
datablock setting.
Behaves much more predictable and clear from code point of view
and solves possible regressions when non-premultiplied images were
used as textures with ignoring alpha channel.
|
|
* MEM_CacheLimitier - Size type to int conversion, should be safe for now (doing my best Bill Gates 640k impression)
* OpenNL CMakeLists.txt - MSVC and GCC have slightly different ways to remove definitions (DEBUG) without the compiler complaining
* BLI_math inlines - The include guard name and inline option macro name should be different. Suppressed warning about not exporting any symbols from inline math library
* BLI string / utf8 - Fixed some inconsistencies between declarations and definitions
* nodes - node_composite_util is apparently not used unless you enable the legacy compositor, so it should not be compiled in that case.
Leaving out changes to BLI_fileops for now, need to do more testing.
|
|
not working at all.
|
|
C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
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.
|