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
2022-05-23Cleanup: clarify what is scene linear color space in conversion conversionBrecht Van Lommel
* Rename ambiguous rgb to scene_linear in some places * Precompute matrices to directly go to scene instead of through XYZ * Make function signatures more consistent
2022-05-23Python API: add mathutils.Color functions to convert color spacesBrecht Van Lommel
Between scene linear and sRGB, XYZ, linear Rec.709 and ACES2065-1. And add some clarifications about color spaces in the docs. Fixes T98267 Ref T68926 Differential Revision: https://developer.blender.org/D14989
2022-04-11Fix OpenColorIO error with configs using <USE_DISPLAY_NAME>Brecht Van Lommel
* Don't assume the display colorspace name fully defines the transform to display space, this is not true in OpenColorIO 2 where view transforms may be defined in more complexs ways than just specifying a colorspace. * In places where we need to store the display colorspace name, resolve <USE_DISPLAY_NAME> token manually. Ref T96590
2022-04-08Fix prefix used for display OCIO shaderSergey Sharybin
Didn't notice this to have real harmful behavior, but is still best to do things properly.
2022-03-24Fix T94001: OpenColorIO configuration with 1D textures not workingBrecht Van Lommel
2022-03-23Color Management: add support for OpenColorIO color space aliasesBrecht Van Lommel
This enables the configuration to specify aliases for compatibility with other configurations. When a colorspace name is saved in a.blend, that is the alias of a colorspace in the current configuration, it will show the main colorspace from the configuration in the user interface and Python API instead. Loading & saving the .blend file does not make any changes to the stored name, so as to not make hidden modifications. Only when setting the property again will the alias name be overwritten by the main colorspace name. Fixes T96049 Differential Revision: https://developer.blender.org/D14419
2022-03-23Fix T96502: Compilation error OCIO when using GradingPrimaryTransform.Jeroen Bakker
When using GradingPrimaryTransform the generated GLSL code fails to compile. The actual issue is inside OCIO (https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1603). The reason is that unset clamping values are rendered out as `inf`, which isn't recognizable by GLSL. The issue is worked around by defining a default for `inf`. Reviewed By: brecht Maniphest Tasks: T96502 Differential Revision: https://developer.blender.org/D14425
2022-02-24OCIO: Fix mip length in texture creationClément Foucault
Also add an assert to avoid reproducing the error in the future.
2022-02-22OCIO: Fix bool1 vs. bool comparison warning.Clément Foucault
Fixes the following warning: `'!=': unsafe mix of type 'bool1' and type 'bool' in operation`
2022-02-19OCIO: Port shader creation logic to use GPUShaderCreateInfoClément Foucault
This commit should suffice to make the shader API agnostic now (given that all users of it use the GPU API). This makes the shaders not trigger a false positive error anymore since the binding slots are now garanteed by the backend and not changed at after compilation. This also bundles all uniforms into UBOs. Making them extendable without limitations of push constants. The generated uniforms from OCIO are not densely packed in the UBO to avoid complexity. Another approach would be to use GPU_uniformbuf_create_from_list but this requires converting uniforms to GPUInputs which is too complex for what it is. Reviewed by: brecht, jbakker Differential Revision: https://developer.blender.org/D14123
2022-02-19Merge branch 'blender-v3.1-release'Clément Foucault
# Conflicts: # intern/opencolorio/ocio_shader_shared.hh
2022-02-19Revert "OCIO: Port shader creation logic to use GPUShaderCreateInfo"Clément Foucault
This reverts commit 7f7c614ecddbcb66de0bff1657366970dede99be.
2022-02-19Revert "OCIO: Fix gpu include file"Clément Foucault
This reverts commit 3cebfadb27eb4056d28211708158f9ad8a7459b7.
2022-02-18OCIO: Fix gpu include fileClément Foucault
Was the cause by ef0e21f0ae71d9ec4ba3cdf6f6a16c9575459ced
2022-02-18OCIO: Port shader creation logic to use GPUShaderCreateInfoClément Foucault
This commit should suffice to make the shader API agnostic now (given that all users of it use the GPU API). This makes the shaders not trigger a false positive error anymore since the binding slots are now garanteed by the backend and not changed at after compilation. This also bundles all uniforms into UBOs. Making them extendable without limitations of push constants. The generated uniforms from OCIO are not densely packed in the UBO to avoid complexity. Another approach would be to use GPU_uniformbuf_create_from_list but this requires converting uniforms to GPUInputs which is too complex for what it is. Reviewed by: brecht, jbakker Differential Revision: https://developer.blender.org/D14123
2022-02-17Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-17Fix build error on some compilers after recent bugfixBrecht Van Lommel
2022-02-17Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-17Fix T95368: wrong white point adaptation for Linear ACES color spaceBrecht Van Lommel
This affected loading of EXR files with set to Linear ACES colorspace, as well as the sky texture for in some custom OpenColorIO configurations. Use the builtin OpenColorIO transform from ACES AP0 to XYZ D65 to fix this.
2022-02-17OCIO: Port shader creation logic to use GPUShaderCreateInfoClément Foucault
This commit should suffice to make the shader API agnostic now (given that all users of it use the GPU API). This makes the shaders not trigger a false positive error anymore since the binding slots are now garanteed by the backend and not changed at after compilation. This also bundles all uniforms into UBOs. Making them extendable without limitations of push constants. The generated uniforms from OCIO are not densely packed in the UBO to avoid complexity. Another approach would be to use GPU_uniformbuf_create_from_list but this requires converting uniforms to GPUInputs which is too complex for what it is. Reviewed by: brecht, jbakker Differential Revision: https://developer.blender.org/D14123
2022-02-11File headers: manually convert files to use SPDX headersCampbell Barton
Also add BSD-2-Clause to SPDX license list.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-05Cleanup: fix typos in source code in intern/Brecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13532
2021-12-25Cleanup: use new c++ guarded allocator APIAaron Carlisle
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
2021-12-17Allocator: simplify using guarded allocator in C++ codeJacques Lucke
Using the `MEM_*` API from C++ code was a bit annoying: * When converting C to C++ code, one often has to add a type cast on returned `void *`. That leads to having the same type name three times in the same line. This patch reduces the amount to two and removes the `sizeof(...)` from the line. * The existing alternative of using `OBJECT_GUARDED_NEW` looks a out of place compared to other allocation methods. Sometimes `MEM_CXX_CLASS_ALLOC_FUNCS` can be used when structs are defined in C++ code. It doesn't look great but it's definitely better. The downside is that it makes the name of the allocation less useful. That's because the same name is used for all allocations of a type, independend of where it is allocated. This patch introduces three new functions: `MEM_new`, `MEM_cnew` and `MEM_delete`. These cover the majority of use cases (array allocation is not covered). The `OBJECT_GUARDED_*` macros are removed because they are not needed anymore. Differential Revision: https://developer.blender.org/D13502
2021-12-10Added support for large texture to OCIO.Jeroen Bakker
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23CMake/win: Fix linker issue with OCIORay Molenkamp
In certain CMake configurations it was possible that OCIO gave linker errors due to it thinking it was using the shared library rather than the static library we ship.
2021-04-16Remove unneeded code from previous commit.Jeroen Bakker
2021-04-16Fix OCIO Shader Compilation Error.Jeroen Bakker
Compilation fails when our OCIO wrapper creates a shader that transfer first to scene ref and directly after that to display. This cause is that the GPU resources of both transfers had the same name. This is fixed by prefixing the resources. This can be reproduced by loading a movie file (mkv) in the VSE editor. Reported by Sergey Sharybin.
2021-03-10Fix wrong white point of Linear ACES in config reading and the bundled configBrecht Van Lommel
The Blender/Cycles XYZ color space has a D65 white point instead of E, and this was not correctly accounted for both in the OpenColor config reading code and the bundled config. This meant that since the OpenColorIO v2 upgrade, the Linear ACES color space was not working correctly, and other OpenColorIO configs defining aces_interchange were not interpreted correctly.
2021-02-17Fix OpenColorIO 2.0 GPU shader error in uniform assignmentBrecht Van Lommel
And fix a (harmless) compiler warning.
2021-02-17Fix T85671: color management crash with Medium Contrast lookBrecht Van Lommel
2021-02-13Cleanup: clang-formatCampbell Barton
2021-02-12OpenColorIO: upgrade to version 2.0.0Brecht Van Lommel
Ref T84819 Build System ============ This is an API breaking new version, and the updated code only builds with OpenColorIO 2.0 and later. Adding backwards compatibility was too complicated. * Tinyxml was replaced with Expat, adding a new dependency. * Yaml-cpp is now built as a dependency on Unix, as was already done on Windows. * Removed currently unused LCMS code. * Pystring remains built as part of OCIO itself, since it has no good build system. * Linux and macOS check for the OpenColorIO verison, and disable it if too old. Ref D10270 Processors and Transforms ========================= CPU processors now need to be created to do CPU processing. These are cached internally, but the cache lookup is not fast enough to execute per pixel or texture sample, so for performance these are now also exposed in the C API. The C API for transforms will no longer be needed afer all changes, so remove it to simplify the API and fallback implementation. Ref D10271 Display Transforms ================== Needs a bit more manual work constructing the transform. LegacyViewingPipeline could also have been used, but isn't really any simpler and since it's legacy we better not rely on it. We moved more logic into the opencolorio module, to simplify the API. There is no need to wrap a dozen functions just to be able to do this in C rather than C++. It's also tightly coupled to the GPU shader logic, and so should be in the same module. Ref D10271 GPU Display Shader ================== To avoid baking exposure and gamma into the GLSL shader and requiring slow recompiles when tweaking, we manually apply them in the shader. This leads to some logic duplicaton between the CPU and GPU display processor, but it seems unavoidable. Caching was also changed. Previously this was done both on the imbuf and opencolorio module levels. Now it's all done in the opencolorio module by simply matching color space names. We no longer use cacheIDs from OpenColorIO since computing them is expensive, and they are unlikely to match now that more is baked into the shader code. Shaders can now use multiple 2D textures, 3D textures and uniforms, rather than a single 3D texture. So allocating and binding those adds some code. Color space conversions for blending with overlays is now hardcoded in the shader. This was using harcoded numbers anyway, if this every becomes a general OpenColorIO transform it can be changed, but for now there is no point to add code complexity. Ref D10273 CIE XYZ ======= We need standard CIE XYZ values for rendering effects like blackbody emission. The relation to the scene linear role is based on OpenColorIO configuration. In OpenColorIO 2.0 configs roles can no longer have the same name as color spaces, which means our XYZ role and colorspace in the configuration give an error. Instead use the new standard aces_interchange role, which relates scene linear to a known scene referred color space. Compatibility with the old XYZ role is preserved, if the configuration file has no conflicting names. Also includes a non-functional change to the configuraton file to use an XYZ-to-ACES matrix instead of REC709-to-ACES, makes debugging a little easier since the matrix is the same one we have in the code now and that is also found easily in the ACES specs. Ref D10274
2021-02-12OpenColorIO: remove default display workaroundBrecht Van Lommel
A fix for this is in 2.0 (and recent 1.1.x versions), no need for this anymore. Differential Revision: https://developer.blender.org/D10275
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-15Liquid Simulation Display Options (GSoC 2020)Sriharsha Kotcharlakot
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch. **Major changes:** === Viewport Display === - //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly. - An option to display //gridlines// when the slicing method is //single//. ==== Grid Display ==== - Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI. ==== Vector Display ==== - //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces. - Made vector display options available for external forces. ==== Coloring options for //gridlines// ==== - Range highlighting and cell filtering options for displaying the simulation grid data more precisely. - Color gridlines with flags. - Also, made slicing and interpolation options available for Volume Object. Reviewed By: JacquesLucke, sebbas Differential Revision: https://developer.blender.org/D8705
2020-09-12Fix remaining GL calls/type preventing from building due to recent cleanupClément Foucault
2020-09-05GPUTexture: OCIO: Workaround new missing bind error checkingClément Foucault
We cannot change the texture bind point since the interface count 4/5 textures to bind. Changing the uniform to avoid one bind make the system thinks one texture is missing. Avoid this by creating a dummy texture and binding it to the empty slot.
2020-09-05Cleanup: GPUTexture: Move debug messages outside of creation functionClément Foucault
# Conflicts: # source/blender/gpu/intern/gpu_framebuffer.cc
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-05OCIO: Use GPUTexture instead of OpenGL calls and remove gl dependencyClément Foucault
Simple cleanup. Part of the Vulkan Port T68990.
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.