Age | Commit message (Collapse) | Author |
|
BLI_testextensie_glob every time in the file selector with a blank string.
|
|
2 bugs here
- missing NULL check in IMB_colormanagement_display_settings_from_ctx()
- deadlock in draw_image_paint_helpers()
Simple solution is to not draw paint helpers for render/viewer images.
|
|
Display code was a bottleneck here, so made it so render
result draw follows Image Draw settings.
|
|
|
|
Skip premultiplication/de-premultiplication when acquiring display
buffer for a byte image. Will make conversion a bit faster also :)
|
|
Now only background images remained to be ported. Plus implement
GLSL for dithering and RGB curves.
|
|
remove unused function uiEmboss()
|
|
- GLSL shader wasn't aware of alpha predivide option,
always assuming alpha is straight. Gave wrong results
when displaying transparent float buffers.
- GLSL display wasn't aware of float buffers with number
of channels different from 4, crashing when trying to
display image with different number of channels.
This required a bit larger changes, namely now it's
possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
to glaDrawPixelsTex, This also implied adding format to
glaDrawPixelsAuto and modifying all places where this
functions are called.
Now GLSL will handle both 3 and 4 channels buffers,
single channel images are handled by CPU.
- Replaced hack for render result displaying with a bit
different hack.
Namely CPU conversion will happen only during render,
once render is done GLSL would be used for displaying
render result on a screen.
This is so because of the way renderer updates parts
of the image -- it happens without respect to active
render layer in image user. This is harmless because
only display buffer is modifying, but this is tricky
because we don't have original buffer opened during
rendering.
One more related fix here was about when rendering
multiple layers, wrong image would be displaying when
rendering is done. Added a signal to invalidate
display buffer once rendering is done (only happens
when using multiple layers). This solves issue with
wrong buffer stuck on the display when using regular
CPU display space transform and if GLSL is available
it'll make image displayed with a GLSL shader.
- As an additional change, byte buffers now also uses
GLSL display transform.
So now only dutehr and RGB curves are stoppers for
using GLSL for all kind of display transforms.
|
|
|
|
Uses GLSL for drawing image in Image Editor space.
This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.
Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.
Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).
internal changes:
- Added functions to setup GLSL shader for color
space conversion in colormanagement.c. Currently
conversion form a colorspace defined by a role to
linear space is implemented. Easy to extend to
other cases.
- Added helper functions to glutil.c which does
smarter image buffer draw (calling all needed OCIO
stuff, editors now could draw image buffer with a
single function call -- all the checks are done in
glutil.c).
- Also added helper function for buffer linearization
from a given role to glutil.c. Everyone now able to
linearize buffer with a single call.
This function will do nothing is GLSL routines fails
or not supported.
And one last this: this function uses offscreen
drawing, could potentially give issues on some
cards, also will keep an eye on this.
|
|
- Building without OCIO will give correct results again
- If GLSL failed to compile, fallback to glaDrawPixelsAuto
will happen.
|
|
Do early out when ibuf has 4 channels only, allocate
4-channels display buffer.
So now we could always assume byte buffer is always
in RGBA format.
|
|
Currently no functional changes for users, but this change
is crucial for further GLSL images display.
|
|
Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:
- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
transformation for a giver processor.
This function compiles and links shader, sets up it's
argument. After this transformation would be applied
on an image displaying as a 2D texture.
So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
do a proper color space transform.
- OCIO_finishGLSLDraw restores OpenGL context after all
color-managed display is over.
- OCIO_freeOGLState frees allocated state structure used
for cacheing some GLSL-related stuff.
There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.
Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.
Known issues:
- Texture buffer and GLSL are no longer checking for
video card capabilities, possibly could lead to some
artifacts on crappy drivers/cards.
- Only float buffers are displaying using GLSL, byte
buffers will still use fallback display method.
This is to be addressed later.
- If RGB curves are used as a part of display transform,
GLSL display will also be disabled. This is also thing
to be solved later.
Additional changes:
- glaDrawPixelsTexScaled will now use RGBA16F as an
internal format of storing textures when it's used
to draw float buffer. This is needed so LUT are
applied without precision loss.
|
|
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
|
|
This makes it so sample line (for all image editor, sequencer and compositor)
displaying managed color for byte buffers as well. It was simply not implemented
before.
|
|
in case image buffer contains byte buffer only and it's
color space matches display space.
It was already check for this case, but it happened later
in color management routines, which is needed for saving
files, but not fast enough for realtime playback of 4K.
|
|
reduce usage of magic numbers.
|
|
|
|
Before alpha channel was simply ignored causing bad looking
straight colors which is pretty much useless.
Now saving RGB would alpha-over image on top of black color,
which makes final image look really nice. It's also very
such the same what other graphics software does this.
In the future we could easily support configurable backdrop
color, which would be really the same as other SW does it.
Also, it'll probably worth adding the same mode to RGB
display of image editor.
|
|
Used by image painting mode, so every brush step would mark area
if affected on, but actual color space conversion would happen
later when actually displaying image.
Implemented as a rcti stored in ImBuf which is getting merged with
partial rect passed to IMB_partial_display_buffer_update_delayed.
This makes painting as fast as it currently possible and finally
solves #33935: Texture painting slow down with mouse, but not with tablet
|
|
|
|
Issue is solved for painting on byte buffer with default sRGB display enabled.
In this case it is possible to skip any color space transform and just apply
dither if needed.
Still not sure if there's a regression in painting on flaots or not, will
continue investigation.
|
|
was enabled.
|
|
also cast strlen to an int to avoid overflow.
|
|
|
|
Also fixed typo in function name.
|
|
Exposure shouldn't affect on alpha channel, only RGB shall be
affected by exposure.
Was a regression since recent alpha premul pipeline changes.
|
|
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.
|
|
In this case we can not validate OCIO configuration and the only way
to fix such issues is to add NULL-pointer checks..
|
|
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
|
|
|
|
free_main().
|
|
|
|
when tree is being executed. This could lead to nor initialized color space
for the image.
Solved by insuring image buffer is loaded before checking for whether color
conversion is needed.
|
|
than normal
There was a missing byte buffer linearization for shader nodes.
Also fixed incorrect image input color space refresh when image is packed.
|
|
No need to linearize byte buffer when converting to display space which is data space.
|
|
few of selected objects failed to bake.
|
|
Just makes progressive refine :)
This means the whole image would be refined gradually using as much
threads as it's set in performance settings. Having enough tiles is
required to have this option working as it's expected.
Technically it's implemented by repeatedly computing next sample for
all the tiles before switching to next sample.
This works around 7-12% slower than regular tile-based rendering, so
use this option only if you really need it.
This commit also fixes progressive update of image when Save Buffers
option is enabled.
And one more thing this commit fixes is handling display buffer with
Save Buffers option enabled. If this option is enabled image buffer
wouldn't have neither byte nor float buffer until image is fully
rendered which could backfire in missing image while rendering in
cases color management cache became full.
This issue solved by allocating byte buffer for image buffer from
tile update callback.
Patch was reviewed by Brecht. He also made some minor edits to
original version to patch. Thanks, man!
|
|
Used the same hack as BLI gzip is using -- calculate short path and
send it to OCIO library.
|
|
Was caused by mixing up own C-API typedefs with OCIO's
|
|
The issue was caused by compositor was allocating float buffer for image and
then this buffer was filled with data converted from byte buffer.
If display happens at time between float was allocated and it was filled black
areas were appearing on the screen.
Made it so IMB_float_from_rect locks color management thread so display
transform wouldn't use uninitialized buffer anymore.
|
|
ocio configuration file failed to load
This solves issues with infinite NULL-checks to prevent crashes in
such situations. Currently only happens if there's no configuration
file at all, but could be tweaked further to fallback if this file
isn't usable by blender.
|
|
to prevent null pointer dereference if the named color profile isn't found
|
|
|
|
display
|
|
IMB_colormanagement_check_file_config
|
|
Solved two issues here:
- RNA update function for cache limiter wasn't type-casting to size_t
type, which lead to long int overflow.
- Display buffer size in color management wasn't calculated properly,
ended up with much more extra memory usage than it's needed.
|
|
|
|
|