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
2020-09-01OCIO: Make GLSL implementation use GPUUniformBuf to avoid debug errorsClément Foucault
Now that we use internal state info, we require drawing that uses the GPU api to use it throughout the whole pipeline. This is in order to track the GL state and do our own error checking.
2020-08-02Cleanup: OCIO: Remove extern "C" around blender headersClément Foucault
2020-07-30GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handleClément Foucault
2020-06-02OCIO: GLSL: Avoid undefined behaviorClément Foucault
Set ubo binding after shaderinterface creation as GPU_shaderinterface_create will call glUniformBlockBinding.
2020-06-02GPU: ShaderInterface: Refactor to setup all uniform at creation timeClément Foucault
This remove the complexity of queriying the locations at runtime and allows for more performance and upfront binding specifications. The benefit of doing everything at creation time is that we can assign binding points in a predictable order which is going to be somewhat the same for every similar shader. This also rewrite GPU_vertformat_from_shader to not use shaderface. This is to keep the shaderface simple. If it becomes necessary to not query the shader after creation (i.e: vulkan?) we could just create the vert format in advance at compilation for PyGPU shaders. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7879
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2019-11-27Curve: CurveMapping Extend OptionJeroen Bakker
Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169
2019-05-01Cleanup: comments (long lines) in various intern/ libsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-18GWN: Port to GPU module: Move files to GPUClément Foucault
This does not include all the struct and type renaming. Only files were renamed. gwn_batch.c/h was fusioned with GPU_batch.c/h gwn_immediate.c/h was fusioned with GPU_immediate.c/h gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-05-31OpenColorIO: cache multiple shaders instead of just one.Brecht Van Lommel
Fixes constant shader and texture rebuilding when doing animation playback with multiple editors that use different view transforms.
2018-04-24OpenGL: Remove remaining instances of GL_RGBA16F_ARB.Clément Foucault
There is no need for it now that we use opengl 3.3. Use GL_RGBA16F instead.
2017-09-07Fix leak w/ ocio glsl drawCampbell Barton
2017-08-30Fix T52591: OpenColorIO not working correct with OpenGL core profile on macOS.Brecht Van Lommel
Also remove textureSize() replacement code, is always supported now.
2017-08-30Attempt to fix OpenColorIO issues on MacDalai Felinto
We cannot have version130 there (should use version 330 instead). Patch suggested by Brecht Van Lommel
2017-08-15Fix building with OCIO after recent gawain files renamings.Bastien Montagne
2017-06-19Fixup for gawan renameDalai Felinto
inten/opencolorio and *.cc were ignored. Build error introduced on b4d053efc75424fca4b413ac1bc7a7e826fac629.
2017-05-08Add comment about vertex format created in OCIOSergey Sharybin
2017-05-02OCIO: Fix crash cause by bad IMM usable.Clément Foucault
2017-04-13Gawain: use ShaderInterface to manage uniformsMike Erwin
This eliminates tons of glGetUniformLocation calls from the drawing loop. Vast majority of code can keep making the same function calls. They're just faster now! - Batch_Uniform* - immUniform* - gpuBindMatrices - and others
2017-04-11Use immediate mode API for OpenColorIOSergey Sharybin
2017-02-24OpenColorIO: Update glsl implementation to be ready for ogl 3.3 coreClément Foucault
2016-02-20OCIO: Disable the warnings related on C4251Sergey Sharybin
Those warnings are trigerred by stl classes in OCIO's public interface. To quote MSDN: "C4251 can be ignored if you are deriving from a type in the Standard C++ Library" This is the only instance where those warnings hunts us, so for now we can keep it all local in intern/opencolorio but this might be changed in the future.
2015-11-24OpenGL: when checking GL version, assume >= 2.1Mike Erwin
Mostly glBlendFunc related.
2014-10-08Fix OpenGL error on cycles rendered viewport.Antony Riakiotakis
We queried the wrong value when looking for the bound 2D texture. This is not totally robust because currently bound texture may not be a 2D one, but this should work for now.
2014-10-08Ghost Context RefactorJason Wilkins
https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately.
2013-12-14Fix T37810: GLSL dither shader not working on OS X.Brecht Van Lommel
The GLSL function textureSize() is not supported here, only when we start using OpenGL core profile will this work. For now check the supported GLSL version and use a somewhat slower replacement.
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-10-10ocio build fix for WindowsDalai Felinto
report by email and patch by Benoit Bolsee "It is a basic compilation bug (variable defined in a c file and declared in the c++ file: name decoration will change the name in the c++ file and the linker will not find it)"
2013-10-10Fix compilation error of OCIO with MSVCSergey Sharybin
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-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-29Tweak allocation vars for XYZ space for more accurate GPU transformSergey Sharybin
Also extend 3DLUT edge size to 64 (1 meg of memory) to increase transform accuracy as well.
2013-04-28Keeping my commit count high!Ton Roosendaal
Previous GLSL code had error, the if() statement had to be negated.
2013-04-28GLSL display of float buffers with alpha:Ton Roosendaal
Previous version worked, now a version with simplifying this GLSL code.
2013-04-28This glsl shader works for OCIO with alpha. OSX iMac with ATI.Ton Roosendaal
There's no logical reason I can find... but I commit it because many others have the same error, so we can check.
2013-04-27Fix for fix in alpha de-premulSergey Sharybin
We do not need to premul shader result, opengl is already configured for straight alpha.
2013-04-27Premultiplication in OCIO shader went wrong,Sergey Sharybin
it used to apply alpha on source color after conversion, not on result.
2013-04-27Apparently better not to use values like 1.0f in GLSL codeSergey Sharybin
Fix from debug session of self and Ton, was affecting OSX builds, making GLSL display transform not working on this platform.
2013-04-27Print error log to the console if OCIO shader compilation failedSergey Sharybin
2013-04-05Fixed typo in OCIO GLSL module, was using address to a pointer..Sergey Sharybin
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-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-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-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.