Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-13remove NULL checks on fixed size arrays, also was calling ↵Campbell Barton
BLI_testextensie_glob every time in the file selector with a blank string.
2013-05-27fix [#35518] UV Mapping crashes the Blender with specific image fileCampbell Barton
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.
2013-05-12Speedup for rendered viewport for blender internalSergey Sharybin
Display code was a bottleneck here, so made it so render result draw follows Image Draw settings.
2013-04-29Fix for non-linear float buffer displaying on raw displaySergey Sharybin
2013-04-15Fix #34967: Display transform makes byte image with alpha=0 blackSergey Sharybin
Skip premultiplication/de-premultiplication when acquiring display buffer for a byte image. Will make conversion a bit faster also :)
2013-04-04Use GLSL display for compositor backdrop and sequencer previewSergey Sharybin
Now only background images remained to be ported. Plus implement GLSL for dithering and RGB curves.
2013-04-04code cleanup: use bools in UI and WM code, quiet some shadow warnings, ↵Campbell Barton
remove unused function uiEmboss()
2013-04-03Bunch of fixes for GLSL display transformSergey Sharybin
- 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.
2013-04-02Fix for potential missing draw-update when building without OCIOSergey Sharybin
2013-04-02More usage of GLSL for color managed image drawingSergey Sharybin
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.
2013-04-02Fixes for recent GLSL display space conversionsSergey Sharybin
- Building without OCIO will give correct results again - If GLSL failed to compile, fallback to glaDrawPixelsAuto will happen.
2013-04-01Fix for recent changes in IMB_display_buffer_acquireSergey Sharybin
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.
2013-04-01Fix for GLSL display: NULL view_settings are allowed nowSergey Sharybin
Currently no functional changes for users, but this change is crucial for further GLSL images display.
2013-03-29Implement GPU-side display transform for clip editorSergey Sharybin
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.
2013-03-25code cleanup:Campbell Barton
- remove unused defines. - quiet some shadow warnings. - bevel, ifdef out some asserts that are too common. - style
2013-03-18Fix #34672: Image sampling line didn't use color management for byte buffersSergey Sharybin
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.
2013-03-15Skip allocating any display buffer and starting any threadsSergey Sharybin
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.
2013-03-11Colormanagement: Fix issue with colorspaces' description too short, and ↵Bastien Montagne
reduce usage of magic numbers.
2013-03-09use 'bool' for BLI_/BKE_ functions.Campbell Barton
2013-02-28Changed a way how RGB images are saving from RGBASergey Sharybin
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.
2013-02-11Implemented delayed partial rect update for image buffersSergey Sharybin
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
2013-02-10style cleanupCampbell Barton
2013-02-08Fix part #33935: Texture painting slow down with mouse, but not with tabletSergey Sharybin
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.
2013-02-07Fix #34139: render display did not convert to straight alpha when dithering ↵Brecht Van Lommel
was enabled.
2013-02-04fix for rangefunc being unused for int & int array.Campbell Barton
also cast strlen to an int to avoid overflow.
2013-01-15Follow general mathutils rules for naming straight<->premul functionsSergey Sharybin
2013-01-09Style cleanup in OCIO areaSergey Sharybin
Also fixed typo in function name.
2013-01-09Fix #33809: Wrong exposure affect after alpha premul changesSergey Sharybin
Exposure shouldn't affect on alpha channel, only RGB shall be affected by exposure. Was a regression since recent alpha premul pipeline changes.
2012-12-31Alpha premul pipeline cleanupSergey Sharybin
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.
2012-11-14Fix #33166: Wrong profile name in config.ocio causes crashSergey Sharybin
In this case we can not validate OCIO configuration and the only way to fix such issues is to add NULL-pointer checks..
2012-11-12code cleanup: spelling,Campbell Barton
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-10fix for crashes running the BGE without colorspace enabled.Campbell Barton
2012-11-07style cleanup, also remove redundant call to set_listbasepointers in ↵Campbell Barton
free_main().
2012-10-29style cleanupCampbell Barton
2012-10-23Correction to recent fix for shader nodes -- image could be not loaded yetSergey Sharybin
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.
2012-10-22Fix #32930: texture colors in material nodes (blender internal) are brighter ↵Sergey Sharybin
than normal There was a missing byte buffer linearization for shader nodes. Also fixed incorrect image input color space refresh when image is packed.
2012-10-15Fix #32858: Image appears too dark in Image EditorSergey Sharybin
No need to linearize byte buffer when converting to display space which is data space.
2012-10-14Fixed missing display buffer and mipmaps invalidation in cases onlySergey Sharybin
few of selected objects failed to bake.
2012-10-13Cycles: progressive refine optionSergey Sharybin
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!
2012-10-06Color Management: fixed loading configuration from non-ascii pathsSergey Sharybin
Used the same hack as BLI gzip is using -- calculate short path and send it to OCIO library.
2012-10-05Fixed compilation error on widowsSergey Sharybin
Was caused by mixing up own C-API typedefs with OCIO's
2012-10-05Fix #32763: Image flickering appears if Movie Clip Editor and compositor openedSergey Sharybin
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.
2012-10-04Color Management: fallback to stub ocio implementation in cases whenSergey Sharybin
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.
2012-10-04colormanage_colorspace_get_named() can (and does) return NULL, added checks ↵Dan Eicher
to prevent null pointer dereference if the named color profile isn't found
2012-09-26Fixed typo in previous commit!Sergey Sharybin
2012-09-26Color Management: resolve warnings when OCIO configuration file misses None ↵Sergey Sharybin
display
2012-09-26Remove unneeded null-check: display settings should always be valid after ↵Sergey Sharybin
IMB_colormanagement_check_file_config
2012-09-26Fix #32666: Memory Cache Limit stops working after set to 2048Sergey Sharybin
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.
2012-09-25code cleanup: make naming more consistentSergey Sharybin
2012-09-25Color Management: mark some TODOs as resolvedSergey Sharybin