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
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-26Code cleanup: use 'const' for arrays (editors)Campbell Barton
2014-03-20Code cleanup: comment unused OpenGL util functionsCampbell Barton
2014-03-17UI: Add theme color for viewport overlayCampbell Barton
Was using wire or black in many places, this color is used for cursor, camera guides, transform helper lines. So its possible to have a dark background with light overlay color. Patch D331 by Brita, with some edits.
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2014-01-15Code Cleanup: use iroundfCampbell Barton
also increase precision of rctf print functions
2013-12-24UI: Display alpha checkers in image info's color swatch.Campbell Barton
2013-12-17Changes to partial update during renderingSergey Sharybin
Summary: Mainly addressed to solve old TODO with color managed fallback to CPU mode when displaying render result during rendering. That fallback was caused by the fact that partial image update was always acquiring image buffer for composite output and was only modifying display buffer directly. This was a big issue for Cycles rendering which renders layers one by one and wanted to display progress of each individual layer. This lead to situations when display buffer was based on what Cycles passes via RenderResult and didn't take layer/pass from image editor header into account. Now made it so image buffer which partial update is operating with always corresponds to what is set in image editor header. To make Cycles displaying progress of all the layers one by one made it so image_rect_update switches image editor user to newly rendering render layer. It happens only once when render engine starts rendering next render layer, so should not be annoying for navigation during rendering. Additional change to render engines was done to make it so they're able to merge composite output to final result without marking tile as done. This is done via do_merge_result argument to end_result() callback. This argument is optional so should not break script compatibility. Additional changes: - Partial display update for Blender Internal now happens from the same thread as tile rendering. This makes it so display conversion (which could be pretty heavy actually) is done in separate threads. Also gives better UI feedback when rendering easy scene with small tiles. - Avoid freeing/allocating byte buffer for render result if it's owned by the image buffer. Only mark it as invalid for color management. Saves loads of buffer re-allocations in cases when having several image editors opened with render result. This change in conjunction with the rest of the patch gave around 50%-100% speedup of render time when displaying non-combined pass during rendering on my laptop. - Partial display buffer update was wrong for buffers with number of channels different from 4. - Remove unused window from RenderJob. - Made image_buffer_rect_update static since it's only used in single file. Reviewers: brecht Reviewed By: brecht CC: dingto Differential Revision: http://developer.blender.org/D98
2013-12-13Implement GPU-side ditherSergey Sharybin
Summary: Uses some magic pseudo-random which is actually a texture coordinate hashing function. TODOs: - Dither noise is the same for all the frames. - It's different from Floyd's dither we've been using before. - Currently CPU and GPU dithering used different implementation. Ideally we need to use the same dither in CPU. Reviewers: brecht Reviewed By: brecht Differential Revision: http://developer.blender.org/D58
2013-12-09Fix T37727: z-offset problems with camera viewCampbell Barton
2013-12-01Code Cleanup: make cpack into a function.Campbell Barton
2013-12-01Code Cleanup: replace ABS() with fabsf() when used with float expressions.Campbell Barton
2013-10-12Option to overlay mask over the footageSergey Sharybin
Currently supports only two modes: - Show alpha channel of the mask - Multiply footage by the mask, which will give you final-looking combined image. TODO: Currently rasterization happens on every redraw, need to cache rasterized mask somewhere to make redraw more realtime.
2013-10-09Implementation of curve mapping in GLSLSergey Sharybin
The title says it all, now having curve mapping enabled in color management settings wouldn't force fallback from GLSL to CPU based color space conversion.
2013-10-04Code cleanup: remove unused functionSergey Sharybin
2013-09-05Code cleanup: use boolean instead of int for colormanagementSergey Sharybin
2013-08-31RenderEngine API: add viewport draw utility functions to bind a GLSL fragmentBrecht Van Lommel
shader for converting colors from linear to display space, based on the scene color management settings. if engine.support_display_space_shader(scene): # test graphics card support engine.bind_display_space_shader(scene) # draw pixels .. engine.unbind_display_space_shader()
2013-04-29Changes to image draw method optionsSergey Sharybin
It's now default to 2D textures, and no AUTO mode at this moment, since detecting which method is the best not so simple. Image drawing could manually be switched to GLSL for tests and feedback, but for default GLSL is not so much great. Reason of this is huge images, where operations like panning becomes dead slow comparing GLSL vs. 2D texture.
2013-04-25Fix #35074: Image editor shows color banding on rendered images (even with ↵Sergey Sharybin
dither set to 2.0) Mistake in one of changes to GLSL display function, missed fallback mode in case dither is non-zero,
2013-04-13code cleanup: warnings + styleCampbell Barton
2013-04-12Image draw method optionSergey Sharybin
This option replaces previously added GPU limit option, which became tricky to follow after GLSL display space conversion. There're 4 modes available: - AUTO which will try to guess which mode is best to use. Currently It'll try using GLSL and if it fails, will fallback to 2D textures. Probably it'll make sense checking on whether 2D textures works well but currently such behavior shall be sufficient. Later we could make this method smarter (for example don't try to use GLSL on certain GPU or so). - GLSL will currently behave the same way as AUTO, but it is intended to always try using GLSL (unless it can not be used because of existing limitation of dither and RGB curves). - 2D Textures will use CPU-based color space conversion and use OGL 2D Texture to display the image. Image will be displayed in tiles, so there shall be no big GPU memory consumption. - DrawPixels will straightly fallback to glDrawPixels without trying to use any fancy GPU stuff. Hopefully this will also fix #34943: Blender crashes when resizing the Compositing Screen Window
2013-04-05Fix #34872: Every images are displayed as black in UV/image editorSergey Sharybin
Issue was caused by some mesa drivers does not support GL_RGBA16F. Now added check around glTexImage2D to verify whether requested internal format is actually supported. If not blender will fall back to non-GLSL image display.
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-03Apparently zoom in clip editor was brokenSergey Sharybin
Also silenced some warnings in glutil.
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-03code cleanup: unused functionsCampbell Barton
2013-04-03Fix/Workaround #34854: render buffer update writes to wrong layerSergey Sharybin
Was caused by recent change in image_buffer_rect_update which was writing data to ibuf-rect_float. Apparently, this buffer could point to different render layer than came from RenderResult. Made quick fix for this, which ends up in skipping float buffer update in image_buffer_rect_update and skipping GLSL when image has both byte and float buffers. This will bring speed down a bit, but slower blender is better than broken blender. Proper fix will arrive later this week.
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-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-17Fix for "draw images as texture"Ton Roosendaal
Zooming in on images in Image window now shows pixels again (was filtered). Now the glaDrawPixelsTex() and glaDrawPixelsAuto() have an argument to define if images should zoom in with linear filter, or draw pixels.
2013-03-17New feature:Ton Roosendaal
Automatic switching for drawing pixel buffers via glDrawPixels or using GPU textures It works with a User Preference limit, in megapixels, to define whether to use GPU or direct pixel drawing. Default is now initialized to 10 MP (4k buffers). Especially for zooming out (draw smaller) texture drawing is much smaller. Also Nvidia cards typically draw much faster with textures in general. Added to node backdrop first now, the other editors follow in a next commit. For coders: added new DNA function to initialize new struct variables, so you don't have to sub-version files anymore. DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname") "filesdna" is the sdna description of the current file being versioned.
2013-03-10patch [#34586] Variable typo in glaDrawPixelsTexScaledCampbell Barton
from Andre D (andred) xzoom was used where yzoom was meant to be used. Caused issues when xzoom and yzoom were not the same value.
2013-03-09code cleanup: favor braces when blocks have mixed brace use.Campbell Barton
2013-01-25header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTreeCampbell Barton
2013-01-09reduce the alpha of console selection (text was too hard to read)Campbell Barton
2012-12-12Holiday coding log :)Ton Roosendaal
Nice formatted version (pictures soon): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability Short list of main changes: - Transparent region option (over main region), added code to blend in/out such panels. - Min size window now 640 x 480 - Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake. - Macbook retina support, use command line --no-native-pixels to disable it - Timeline Marker label was drawing wrong - Trackpad and magic mouse: supports zoom (hold ctrl) - Fix for splash position: removed ghost function and made window size update after creation immediate - Fast undo buffer save now adds UI as well. Could be checked for regular file save even... Quit.blend and temp file saving use this now. - Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)" - New Userpref option "Keep Session" - this always saves quit.blend, and loads on start. This allows keeping UI and data without actual saves, until you actually save. When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header) - Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. - User preferences (themes, keymaps, user settings) now can be saved as a separate file. Old option is called "Save Startup File" the new one "Save User Settings". To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still. - OSX: fixed bug that stopped giving mouse events outside window. This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-10-26code cleanup: use min_/max_ math functions, add minmax_v2_v2v2.Campbell Barton
2012-10-23rename api functions...Campbell Barton
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-09-15code cleanup: replace macro for BLI_rect size/center with inline functions.Campbell Barton
2012-09-06code cleanup: capitalize defines.Campbell Barton
2012-08-22code cleanup: use rect size macrosCampbell Barton
2012-08-05use define for 0.375 = GLA_PIXEL_OFS, used all over the interface.Campbell Barton
also use M_SQRT1_2 in math_rotation.c
2012-07-29add inline functions for max/min ints, good to use when the arguments are ↵Campbell Barton
function calls (we had a few of these).
2012-05-08style cleanup: screenCampbell Barton
2012-05-04Renamed "fake" OpenGL identifiers.Jason Wilkins
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool. Most of these were in comments so I just rephrased the comments. There were a couple of static functions/macros that were easy enough to rename. Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
2012-04-29style cleanup: whitespace / commasCampbell Barton
2012-04-28style cleanup: changes to brace placement / newlines - for/while/if/switchCampbell Barton
2012-04-23code cleanup: comment unused functions (removed one which isnt useful anymore).Campbell Barton
2012-03-28Cycles: viewport rendered draw mode now shows background images, also ↵Brecht Van Lommel
changed the image editor checkerboard pattern to be the same as cycles viewport.
2012-03-24style cleanup: follow style guide for formatting of if/for/while loops, and ↵Campbell Barton
else if's